PHPSwaggerGen icon indicating copy to clipboard operation
PHPSwaggerGen copied to clipboard

Insert content of preprocessor variable into documentation

Open SirTomme opened this issue 6 years ago • 0 comments

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?

SirTomme avatar Mar 08 '18 09:03 SirTomme