/openshift-json-schemas

A set of JSON schemas for the most recent OpenShift versions

Primary LanguageMakefileApache License 2.0Apache-2.0

OpenShift JSON schemas

This project provides a set of JSON schemas for the most recent OpenShift versions, starting with version 4.10. These schemas are useful, for example, for validating OpenShift YAML or JSON files locally with tools like Kubeval or Kubeconform.

This project was inspired by the OpenShift JSON schema project by Gareth Rushgrove and this Red Hat Cloud blog article by Andrew Block.

The schemas were generated from OpenAPI v2 specifications, which were dumped from OpenShift instances run by CRC, and then converted to JSON schemas using openapi2jsonschema. A Makefile automating these various steps is available.

For each OpenShift version, different "flavors" of schemas are available:

  • vX.Y: URL-referenced schemas
  • vX.Y-standalone: de-referenced schemas, which are more useful as standalone documents
  • vX.Y-standalone-strict: de-referenced schemas, which are more useful as standalone documents and prohibit properties not in the schema
  • vX.Y-local: relative references, which are useful for avoiding network dependencies.