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
"schema": {
"$ref": "#/definitions/SEQ-case-investigate-review-results%3AReviewresultsRequest"
}
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.