Skip to content
Tim Burks edited this page Feb 6, 2017 · 25 revisions

OpenAPI Compiler

The OpenAPI Compiler (openapic) is a tool for reading and processing API models described by the OpenAPI Specification. API models can be in JSON or YAML and referenced with local file names or URLs. openapic reads specified models, checks for errors, and generates a binary Protocol Buffer representation of the API that can be used by other tools and openapic plugins. These tools and plugins can use models and support code that allow efficient, statically-typed access to OpenAPI models.

Much of openapic is automatically generated by the OpenAPI Compiler Generator.

openapic currently supports OpenAPI 2.0 with compiler and protocol buffer code that is automatically generated from the OpenAPI 2.0 schema. Applications and plugins can be built from code generated from OpenAPIv2.proto. Go code for a sample application can be found in apps/report/main.go.

openapic uses a Plugin Architecture to support creation of OpenAPI tools in any language that is supported by protoc, the Protocol Buffer compiler. Sample plugins are in the plugins directory.

Future Plans

  • As the OpenAPI 3.0 schema develops, openapic will be extended to support both versions of OpenAPI.

  • We are working to provide a way to generate Compiler Extensions that will parse OpenAPI vendor extensions.

Clone this wiki locally