Closed get2parag closed 6 years ago
@get2parag Thanks.
Code generation is not in the scope of this project, but I would imagine that the parser would be a good choice for use in such an undertaking.
The swagger-codegen project you reference uses its own parser, not the KaiZen parser, and that project's support for OpenAPI3 is still quite sketchy. Perhaps that's why you're looking at the KaiZen parser? There's no way to simply substitute this parser into the swagger-codegen
framework, and my impression is that the current difficulties with OpenAPI3 run fairly deep in swagger-codegen, including the fact that most of the codegen modules are community-contributed, and each of them would need to be upgraded to understand all the new capabilities of OpenAPI3.
So bottom line is it may still be a while before there's anything like the SwaggerV2 swagger-codegen solution available for OpenAPI3.
There's a commercial product - RepreZen API Studio - that includes facilities to create code generators and that supports the KaiZen parser for OpenAPI3 models. That might be an attractive option for you to look into. You can visit www.reprezen.com to get started with a free trial license.
Hi, I'm trying to use kaiZen-OpenApi-Parser library to parse through an openapi.json document and generate API calling client code however not able to figure out by means of current documentation.
It seems it is straight forward to parse the specs on runtime and play with it like -
OpenApi3 model = new OpenApi3Parser().parse(file, true); Operation getDynamicAction = model.getPath("/dynamic_action").getGet(); JsonNode node = Overlay.of(model).toJson(SerializationOptions.Option.FOLLOW_REFS); // parse through the node
However I'd like to find a way for compile time java code generation probably through a maven goal like swagger-codegen. Any help appreciated here.