-
Notifications
You must be signed in to change notification settings - Fork 19
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
Code generation using swagger / openapi specification file #82
Comments
No, this is done via an internal generator that also happens to generate the Swagger.json The swagger.json that bunq provides is to new to be generated with that tool. I recall there is an issue for this in their repo. bunq is using openApi3 which is not supported by that too yet. Reference: swagger-api/swagger-codegen#6598 However, I'm not sure |
Ah ok interesting. So the swagger file is mostly for ReDoc? It seems like OpenAPI v3 should be good with {parameters} in the url. (https://swagger.io/docs/specification/describing-parameters/) The server objects also allows for parameters (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#server-object) It seems that https://github.com/openapitools/openapi-generator is a fork of swagger-codegen. Running the command locally on the same file does not return the URL errors. Only the other errors. So that is very strange..
The remaining issues seem to be related to the properties being an array. Which should be an object: Current
Properties should be an object:
|
No, ReDoc is not being used anymore. The "official" swagger viewer is being used now. #56 You're indeed correct about the properties. They should be an object not array, that's indeed a bug in the generator. |
Hi @vverst! Just a small heads up that we're actively working on improving OpenAPI file generation so that it's actually compliant with the spec. However do note that it may take some time, as we're solving some structural internal problems in the meantime. Also, SDK generated that way might not be the best result anyway, and hand-crafted approach similar to https://github.com/bunqCommunity/bunqJSClient might be better. |
…inition Remove unneeded header definitions to satisfy the spec. (#82)
Hi,
I tried to use the openapi-generator-cli to generate a client for the bunq api using the provided swagger/openapi specification file (https://raw.githubusercontent.com/bunq/doc/master/swagger.json) but I am having trouble with the code generation.
How are the bunq sdks (python, php, csharp) generated? Are they also using the openapi generator?
Code generation
Using the following command:
Gives me the following error output:
Validation
Trying to validate the openapi file gives the following errors:
The text was updated successfully, but these errors were encountered: