Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is to fix an issue in the openapi generator
When we have regular expressions they come in 2 formats
In the first one if the pattern contains a forward slash
(aka Solidus from
https://www.ecma-international.org/archive/ecmascript/2013/GA/ga-2013-076.pdf)
it needs to be escaped with a backslash (reverse solidus)
In the second case we dont have to escape the forward slash
In our openapi spec we have always tended to use the second format.
The openapi generator checks the first charachter and if it starts
with a forward slash it assumes it's the first format and doesn't
escape the / contained in the string
https://github.com/OpenAPITools/openapi-generator/blob/de2753dfc7d17a8afcc14fdd705ade3f6cca3cb2/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java#L4825
In our tags we are expecting values like
/approval/workspace=55
Since our regexp starts with a / it bypasses the escaping process in the
openapi generator
To temporarily resolve this issue I have modified our regular expression to have a ^
which bypasses the first charachter to be / in the openapi-generator
I have opened an issue with the openapi-generator repository which might
resolve the issue on the generator
OpenAPITools/openapi-generator#5582