-
Notifications
You must be signed in to change notification settings - Fork 30
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
Unable to import API into ruby client #268
Comments
The OAS definition is generated. I ran it through a validator and found some smaller issues. I fixed it in a branch https://github.com/commercetools/commercetools-api-reference/compare/oas_fix Can't merge it as before the code generator has to be adjusted |
I fixed the issues in the generator and the OpenApi spec file is now valid |
@jenschude I'm no longer getting the errors for certain schemas that are missing, but I'm still getting the below error - are there any additional updates I need to run and/or arguments that need passed for it to run successfully?
|
Ah there is a small mistake still inside. Could you just remove line 76330
and line 79819
|
Same error - looks like the last thing that runs before I do receive the error is for |
Correction - it is a different error but seems to still be caused by a null request body:
|
It was the issue with the image upload endpoint, that the code generator expected some body definition whereas the spec says it's valid to have no body type at all. 🤷 Fixed it to be a string. Tried your command and it works now. |
@jenschude thanks! It successfully runs now - but still getting this error when I go to require the gem from the irb console
|
Don't know what the openapi generator is creating there and i don't know enough of ruby to be of help here. |
Okay I can open an Issue with openapi and make sure it's not an issue with the ruby generator. Essentially it's not able to load the class |
@jenschude I think this is an issue with the openapi generator after all, so I'm going to go ahead and close this issue. Thanks for all your help!! |
I'm trying to generate a ruby client via OpenAPI Generator. We've used both the npm installation approach as well as the homebrew installation. When trying to generate the client via CLI, we run into a number of warnings and some errors that end up blocking file generation.
Steps to reproduce
Install CLI
Generate ruby client
Errors
The primary error seems to be
But there are also a bunch of missing schema errors too (unsure if it's related to the above error):
-attribute components.schemas.ReplicaMyCartDraft.items is missing
-attribute paths.'/{projectKey}/product-projections/search'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.#/components/schemas/string is missing
As is suggested by the generator, I appended to
--skip-validate-spec
to the generator command and all files successfully populate, but the classes in the newly created gem are failing to load:Could this be an issue with the spec?
The text was updated successfully, but these errors were encountered: