Skip to content

Insert content of preprocessor variable into documentation #36

@SirTomme

Description

@SirTomme

Besides just checking if a preprocessor variable has a given value (@rest\if name value) it would be very helpful to have its value inserted somewhere inside the documentation.
For example instead of incrementing the API version manually as in
// @rest\version 0.9.14

I would like to have it changed automatically like:
// @rest\version {myversion}
$SwaggerGen->define('myversion', 'generated-version');

Should output:
"info": { "version": "generated-version" }

Instead of using {placeholder} you could use @rest\var(placeholder) or something similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions