Skip to content
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

Add patch and tests for wrongly generated property names due to openapi-generator bug #2

Open
TimoGlastra opened this issue Dec 31, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@TimoGlastra
Copy link
Member

TimoGlastra commented Dec 31, 2019

OpenApi generator has a bug where property names are sanitized. This causes problems for some endpoints as they expect an @type property in the post object instead of an type property.

I have created an issue in the openapi-generator repo OpenAPITools/openapi-generator#4748, but I don't think it will be fixed in the near future.

For now I started with a patch that overwrites the wrong property names. https://github.com/ula-aca/aries-cloudagent-interface-javascript/blob/master/patches/api.patch. Whenever I come across an endpoint that has wrong generated property names I add it to the patch.

We should walk trough all endpoints, check if the property names are correct and add them to the patch if this is not the case. We should also write tests to somehow guarantee the patch is valid for the generated code, as the openapi schema can change.

@TimoGlastra TimoGlastra added the bug Something isn't working label Dec 31, 2019
@TimoGlastra TimoGlastra pinned this issue Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant