Skip to content

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

@TimoGlastra

Description

@TimoGlastra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions