Ask a Question

Is there a Java SDK available to represent the Open API Specification Schema

jains2k
Occasional Visitor

Is there a Java SDK available to represent the Open API Specification Schema

Hi 

 

I am trying to generate open api specification programmatically and not finding any SDK that either helps manipulating and generating an Open API Spec yaml (I found Kaizen but it's not maintained anymore), and neither a java code generated SDK from the Open API specification schema. I tried to use Jackson to generate POJOs from the Open API Specification schema, but it misses a lot of nitty gritties in the generated code (for example `Schemas` only supports `additionalProperties`, and no other attributes).

Any help locating a library that helps manipulate/write Open API Specifications or an SDK of java POJOs that supports the full extent the Open API Spec schema would be really helpful.

 

 

1 REPLY 1
frantuma
Staff

Hi,

 

I am summarizing here your requirements to make sure I got them right:

 

1. to generate open api specification programmatically / manipulate/write Open API Specification

2. manipulating and generating an Open API Spec yaml

3. java code generated SDK from the Open API specification schema / SDK of java POJOs that supports the full extent the Open API Spec schema

 

This functionality is provided by one or more of swagger-api OSS tools, specifically:

 

Swagger Core (see also wiki ) provides OAS Java Representation, APIs, (de)serialization, resolution from POJOs / JAX-RS and annotations.

 

Swagger Parser provides parsing/validation and dereferencing/bundling

 

Swagger Codegen provides generation from a OAS spec of client SDKs and Server stubs in various languages including JAVA, and of documentation.

 

Also check Web/JS tools Swagger UI (here a demo) for rendering/visualization/testing  and web editors Swagger Editor (here a demo, supports OAS 2.x and 3.0) and Swagger Editor@Next (here a  demo, supports OAS 3.0-3.1 and AsyncAPI 2.x)

cancel
Showing results for 
Search instead for 
Did you mean: