-
Notifications
You must be signed in to change notification settings - Fork 35
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
Attempt to generate an OpenAPI based redfish client #179
Comments
The schemas we publish should follow OpenAPI 3.0.1. I've had limited success so far with code generators with OpenAPI 3.0. At least looking at go-swagger, it appears it's still on Swagger 2.0 (at least as far as I can tell), so that will be a no go. swagger-codegen I know has been rolling out support for 3.0 over the last few months. I can take a look at it again since the last time I tried it. |
Since what I posted earlier, we had some success with openapi-generator-cli and are now testing the generated client https://github.com/bmc-toolbox/redgopher There was just one fix to the spec that was required, |
Please keep us updated on your progress! The 3.0 ecosystem is still very new, so anything we can do on our end to make this process work easier, or at least document the howto's, we're interested! |
Excellent work @joelrebel ! I have a fix in the tool ready for what you did; it was brought up in issue #169 and will be ready for the next publication of schema. |
What is the actual cause of Exception safe-checking of maxDepth 2000 ? My file generation always falls into this error on longer .yaml file. Tried on swagger-codegen version 2.4.2 and 3.0.5. Interesingly on version 2.3.0 generator does not throw this error.
|
Sorry to be polluting this project's issue discussion, but since google brought me here for my search on "IllegalAccessError snakeyaml DeserializationUtils", let me drop a quick answer to this question by @Yurdaaaaa and share the results of my research:
This has to do with the version <snakeyaml / issues / #320> is fixed (1.17+), and the snakeyaml jar/binary that's bundled in swagger-codegen version 2.4.2! It seems swagger parser code was written assuming SnakeYAML 1.17+ codebase (where "composer" field is So, as far as I can see the root of the problem has to do with swagger-codegen packaging (of version 2.4.2 at least)! I've changed the dependency to version 2.4.4, and do not get the IllegalAccessError callstack anymore. And tracking a bit more on that path, I've noticed there indeed was an intentional fix on the source of the problem: Issue 9268 - PR 9243 |
An update from recent testing: working with 2019.2 and the latest version of Swagger Codegen, everything seems to work successfully, with one minor exception. When generating Python code, it will throw an exception about the format of the pattern strings; it's currently expecting them to be wrapped with "/" characters per Perl conventions. However, I found a discussion on the OpenAPI group that this isn't correct and will need to be fixed in the tool's handling of pattern (see OAI/OpenAPI-Specification#1985). @joelrebel have you been trying conversion on your end with 2019.1 or 2019.2 with updated versions of Swagger Codegen? |
Closing; would like to test with newer schema bundle releases and updated OpenAPI tooling |
If this issue does not belong here, do let me know where to raise it,
I'm basically attempting to generate a Go client for Redfish using the OpenAPI spec,
and I've not had any luck so far, these were the steps I followed,
https://www.dmtf.org/sites/default/files/standards/documents/DSP8010_2018.3.zip
My queries here are,
go-swagger
https://gist.github.com/joelrebel/4a5def94a39a0f504bed854376a80b72
swagger-codegen
The text was updated successfully, but these errors were encountered: