# gnostic

A command-line compiler that converts OpenAPI descriptions between JSON, YAML, and an equivalent Protocol Buffer representation, with a plugin interface for code generation and other API tooling.

gnostic reads an OpenAPI description in JSON or YAML and converts it into a Protocol Buffer representation with explicit fields for each element of the description, then can re-export that representation back to JSON or YAML. Working with the typed protobuf form lets tools built in strongly typed languages such as Go and Dart handle OpenAPI descriptions in a type-safe way, and it reports errors and resolves internal dependencies while doing the conversion.

A plugin interface lets other tools integrate with gnostic to generate code or perform other API-related tasks in different languages; related projects reuse its generated protobuf models, generate gRPC transcoding annotations, or generate a Go client from an OpenAPI document. The compiler and its models are themselves generated from an OpenAPI JSON Schema.

It is written in Go and released under the Apache-2.0 license.

Website: https://github.com/google/gnostic
