-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preprocesing swagger.json makes operationId duplicated #145
Comments
It looks like this behavior is crucial. OperationId is used to build method name and we have the same name in different API versions (beta, alpha etc). |
Have you tried removing the replacing step?
Yes, that's what I though it does. Without the replacing step we would have the API versions in the method names, which would be a breaking change and a more verbose UX. Having the same method name in different API versions worked for us. Is there any reason that openapi-generator enforces unique operationID across all modules? |
It's required by the OpenAPI spec: https://swagger.io/specification/#operationObject |
Fair enough. I think keeping the old method names is a better UX and is also backwards compatible. In the meantime, I'm not sure what signals does the openapi-generator spec validation give us. If it adds value on top of the other testing we have (e.g. client e2e tests), we may consider doing things like
|
Use v4.3.0 by default now using the OPENAPI_GENERATOR_COMMIT variable. This can be overriden by specifying the same variable in the SETTINGS_FILE Also, set the `skipValidateSpec` parameter in `openapi/python.xml` to work around [this](kubernetes-client#145) bug.
Use v4.3.0 by default now using the OPENAPI_GENERATOR_COMMIT variable. This can be overriden by specifying the same variable in the SETTINGS_FILE Also, set the `skipValidateSpec` parameter in `openapi/python.xml` to work around [this](#145) bug.
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The script
preprocess_spec.py
removes "tags" fromoperationId
downloaded from K8s spec:gen/openapi/preprocess_spec.py
Line 102 in 09f7470
and it makes that some operationId's become duplicated but they should be unique.
The latest version of openapi-generator (>4.x) has additional validations which complains about that:
We can disable this validation or fix our script by removing this replacing step - is this replacement necessary?
The text was updated successfully, but these errors were encountered: