All Projects → garethr → openshift-json-schema

garethr / openshift-json-schema

Licence: other
A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions

Programming Languages

shell
77523 projects
powershell
5483 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to openshift-json-schema

Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+3708.7%)
Mutual labels:  json-schema, openapi
Json Schema To Openapi Schema
A little NodeJS package to convert JSON Schema to OpenAPI Schema Objects
Stars: ✭ 168 (+630.43%)
Mutual labels:  json-schema, openapi
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+172021.74%)
Mutual labels:  json-schema, openapi
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+33095.65%)
Mutual labels:  json-schema, openapi
okd-installation-centos
This repository is used to create OKD 3.11 Cluster with 9 simple steps on Bare VM's
Stars: ✭ 23 (+0%)
Mutual labels:  openshift, openshift-origin
Swagger Parser
Swagger 2.0 and OpenAPI 3.0 parser/validator
Stars: ✭ 710 (+2986.96%)
Mutual labels:  json-schema, openapi
Minishift
Run OpenShift 3.x locally
Stars: ✭ 2,246 (+9665.22%)
Mutual labels:  openshift, openshift-origin
modelina
Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Stars: ✭ 55 (+139.13%)
Mutual labels:  json-schema, openapi
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+956.52%)
Mutual labels:  json-schema, openapi
Kubernetes Json Schema
A set of JSON schemas for various Kubernetes versions, extracted from the OpenAPI definitions
Stars: ✭ 234 (+917.39%)
Mutual labels:  json-schema, openapi
Datamodel Code Generator
Pydantic model generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
Stars: ✭ 393 (+1608.7%)
Mutual labels:  json-schema, openapi
openshift-install
Install Openshift Docker Meetup Jakarta-Indonesia
Stars: ✭ 17 (-26.09%)
Mutual labels:  openshift, openshift-origin
Ring Swagger
Swagger Spec for Clojure Web Apps
Stars: ✭ 351 (+1426.09%)
Mutual labels:  json-schema, openapi
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+3513.04%)
Mutual labels:  json-schema, openapi
Jsonschema
An implementation of the JSON Schema specification for Python
Stars: ✭ 3,474 (+15004.35%)
Mutual labels:  json-schema, openapi
Uvicorn Gunicorn Fastapi Docker
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.
Stars: ✭ 1,014 (+4308.7%)
Mutual labels:  json-schema, openapi
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-4.35%)
Mutual labels:  json-schema, openapi
json-ref-resolver
[Deprecated] Recursively resolve JSON pointers and remote authorities.
Stars: ✭ 27 (+17.39%)
Mutual labels:  json-schema, openapi
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (+900%)
Mutual labels:  json-schema, openapi
OpenShift-Azure-Terraform
⛑ Deploy OpenShift Origin on Azure using Terraform and Ansible
Stars: ✭ 21 (-8.7%)
Mutual labels:  openshift, openshift-origin

OpenShift JSON Schemas

Build Status

For the upstream Kubernetes schemas instead see garethr/kubernetes-json-schema.

While exploring tooling for Kubernetes I had need for schemas to describe the definition files, and went looking for something that didn't require either kubectl or similar installed or even a working Kubernetes installation.

It turns out that the OpenAPI specification contain this information, but not in a particularly usable format for tools which might just want a raw JSON Schema.

This repository contains a set of schemas for most recent OpenShift versions. For each specified versions you should find three different flavours:

  • vX.Y.Z - URL referenced based on the specified GitHub repository
  • vX.Y.Z-standalone - de-referenced schemas, more useful as standalone documents
  • vX.Y.Z-local - relative references, useful to avoid the network dependency

Example

Here are the links to the latest deployment schemas for OpenShift 1.5.1:

Usage

There are lots of use cases for these schemas, they are primarily useful as a low-level part of other developer workflow tools. But at a most basic level you can validate a definition file.

Here is a very simply example using the Python jsonschema client and an invalid deployment file:

$ jsonschema -F "{error.message}" -i hello-nginx.json 1.5.1-standalone/deployment.json
u'template' is a required property

Specific ideas

As noted these schemas have lots of potential uses for development tools. Here are a few ideas, some of which I've been hacking on:

  • Demonstrating using with the more common YAML serialisation
  • Testing tools to show your Kubernetes configuration files are valid, and against which versions of Kubernetes
  • Migration tools to check your config files are still valid against master or beta releases
  • Integration with code editors, for instance via something like Schema Store
  • Validation of Kubernetes configs generated by higher-level tools, like Helm, Ksonnet or Puppet
  • Visual tools for crafting Kubernetes configurations
  • Tools to show changes between Kubernetes versions

Prior-art

The discussion around wanting JSON Schemas for Kubernetes types has cropped up in a few places, but there are some useful comments on this issue. Joël Harkes reached a similar conclusion to the approach I ended up taking.

Building the schemas yourself

The tooling for generating these schemas is openapi2jsonschema. It's not Kubernetes specific and should work with other OpenAPI specificied APIs too.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].