andrenth / ocaml-swagger

Swagger 2.0 code generator for OCaml
37 stars 10 forks source link

Expose swagger schema #23

Open rizo opened 4 years ago

rizo commented 4 years ago

Exposes the internal Swagger schema in the public interface of the library. This is useful for use cases when the Swagger schema needs to be generated programatically by, for example, HTTP APIs.

I think at some point it would be nice to split the code generator from the type definitions and JSON encoders. In this PR I tried to be conservative and kept backwards compatibility.