swagger-codegen
swagger-codegen copied to clipboard
[Ruby] OpenAPI spec version is not being updated in spec/* files
Description
Calling swagger-codegen for the ruby client does not update the OpenAPI spec version in the comments of the spec files.
Swagger-codegen version
> swagger-codegen version
3.0.52
Swagger declaration file content or url
OpenAPI yaml spec:
https://gist.github.com/pijng/b3d09581c4f7bbf81bac4778dc8516f2
Command line used for generation
swagger-codegen generate -i ./openapi.yaml -l ruby -o /Projects/swagger-codegen-ruby/ --additional-properties gemName=moonlogs-ruby gemVersion=0.3.10
Steps to reproduce
- Create an empty directory
- Populate it with generated ruby client for version 0.3.10 using
openapi.yamlspec from gist by calling:
swagger-codegen generate -i ./openapi.yaml -l ruby -o <path-to-directory> --additional-properties gemName=moonlogs-ruby gemVersion=0.3.10
- Change the
info.versionto 0.3.11 inopenapi.yaml - Call swagger-codegen against the updated
openapi.yamlwith relevant version ingemVersion:
swagger-codegen generate -i ./openapi.yaml -l ruby -o <path-to-same-directory> --additional-properties gemName=moonlogs-ruby gemVersion=0.3.11
As the result, all references to version 0.3.10 will be replaced by 0.3.11, except for files in the spec/ directory.
Demonstrating the difference between versions at a single point in time: