PHPSwaggerGen
PHPSwaggerGen copied to clipboard
Insert content of preprocessor variable into documentation
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?