Skip to content
Tim Burks edited this page May 21, 2017 · 25 revisions

gnostic

gnostic 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. gnostic reads specified models, checks for errors, and generates a binary Protocol Buffer representation of the API that can be used by other tools and gnostic plugins. These tools and plugins can use generated models and support code that allow efficient, statically-typed access to OpenAPI models.

Much of gnostic is automatically generated by gnostic-generator.

gnostic 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.

gnostic 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, gnostic 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