Model class name mismatch when using special characters in API name (operationId)
Say I have an endpoint named: "SEQ-case-investigate-review-results: Review results"
Then when I export this to OpenAPI/Swagger 2.0 (JSON) format, I get the following parameters for this endpoint (along with others):
"operationId": "SEQ-case-investigate-review-results:Reviewresults" and
You can see that the $ref is url encoded.
I have lots of API with special characters in their name/operationId, which I got from third party.
Due to this, when I'm creating a server stub using SwaggerHub for Java (I've tried JAX-RS and Spring), my model classes are being misnamed in its source code. So if we take the above example, the model class is named "SEQCaseInvestigateReviewResultsReviewresultsRequest". The other classes wanting to use this class are using the name "SEQCaseInvestigateReviewResults3AReviewresultsRequest". SwaggerHub is somehow encoding the name used while "calling" and is not encoding the name for generating the actual model class.
I was able to reproduce this issue locally, meantime a solution is made i would recommend use the original definition name instead the encoded one, the editor will point that as an error but you can still generates code and get the expected output.
So for your case you just need to use: