Package openapi is a set of Go types for OpenAPI Specification 3.1. The primary purpose of the package is to assist in generation of OpenAPI documentation or to offer building blocks for code-generation.
Documentation can be found on pkg.go.dev.
Currently, specifications are validated with JSON Schema. Per OpenAPI's documentation, this may not be enough to properly encapsulate all the nuances of a specification. However, JSON Schema is able to properly validate the current OpenAPI 3.1 Specification test suite.
Please open an issue if you run into an edge case that is not validated adequately.
Please feel free to open up an issue or create a pull request if there are features you'd like to contribute or issues.
- github.com/santhosh-tekuri/jsonschema/v5 (used for json schema validation)
- github.com/evanphx/json-patch/v5 (used for testing purposes)
- github.com/stretchr/testify (testing)
- github.com/tidwall/gjson (json parsing)
- github.com/tidwall/sjson (json manipulation)
- github.com/wI2L/jsondiff (testing purposes)
- gopkg.in/yaml.v2 (yaml)
- sigs.k8s.io/yaml (yaml)
- github.com/chanced/cmpjson (testing purposes)
- github.com/chanced/dynamic (json parsing)
- github.com/pkg/errors (errors)
MIT