Closed ex0ns closed 1 year ago
@ex0ns Thanks for working on supporting 5.0.0
I think parse
ctx.file._codegen_cli.basename
will help. at least for jar name convention, we all have version in the name.
Pull request is now available https://github.com/meetup/rules_openapi/pull/49
Hello
I am trying to use this rules to generate scala code from an OpenAPI 3.0 spec, my WORKSPACE file contains the following section:
I have to use the
openapi
provider because it is the only one that support OpenAPI 3.My BUILD file contains
When building this target, the build fails. After investigation, the generated command is:
Which fails with
[error] Found unexpected parameters: [-D, ]
This issue was documented on OpenAPI-generator side: https://github.com/OpenAPITools/openapi-generator/blob/150e24dc553a8ea5230ffb938ed3e6020e972faa/docs/global-properties.md#note-on-global-property-declaration
The fix would be to use
--global-property
instead of-D
, I can open a PR for that, but I would need a hand to detect if the version of open api is greater than5.0.0
.However I don't know what would be the proper way to extract the version number from
ctx.file.codegen_cli.path
, should we look for aX.Y.Z
regex ?Thanks `