{"id":15655808,"url":"https://github.com/garethr/openshift-json-schema","last_synced_at":"2025-05-05T14:43:20.647Z","repository":{"id":22118693,"uuid":"95350603","full_name":"garethr/openshift-json-schema","owner":"garethr","description":"A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions","archived":false,"fork":false,"pushed_at":"2019-08-31T07:21:15.000Z","size":10966,"stargazers_count":24,"open_issues_count":6,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T05:49:30.011Z","etag":null,"topics":["json-schema","kubernetes","openapi","openshift","openshift-origin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garethr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-25T09:35:59.000Z","updated_at":"2024-04-13T09:20:31.000Z","dependencies_parsed_at":"2022-08-07T11:00:06.581Z","dependency_job_id":null,"html_url":"https://github.com/garethr/openshift-json-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethr%2Fopenshift-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethr%2Fopenshift-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethr%2Fopenshift-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethr%2Fopenshift-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garethr","download_url":"https://codeload.github.com/garethr/openshift-json-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252516295,"owners_count":21760751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json-schema","kubernetes","openapi","openshift","openshift-origin"],"created_at":"2024-10-03T13:00:36.321Z","updated_at":"2025-05-05T14:43:15.626Z","avatar_url":"https://github.com/garethr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift JSON Schemas\n\n[![Build Status](https://travis-ci.org/garethr/openshift-json-schema.svg?branch=master)](https://travis-ci.org/garethr/openshift-json-schema)\n\nFor the upstream Kubernetes schemas instead see\n[garethr/kubernetes-json-schema](https://github.com/garethr/kubernetes-json-schema).\n\nWhile exploring tooling for Kubernetes I had need for schemas to\ndescribe the definition files, and went looking for something that\ndidn't require either `kubectl` or similar installed or even a working\nKubernetes installation.\n\nIt turns out that the [OpenAPI](https://www.openapis.org/) specification\ncontain this information, but not in a particularly usable format for tools\nwhich might just want a raw [JSON Schema](http://json-schema.org/).\n\nThis repository contains a set of schemas for most recent OpenShift\nversions. For each specified versions you should find three\ndifferent flavours:\n\n* vX.Y.Z - URL referenced based on the specified GitHub repository\n* vX.Y.Z-standalone - de-referenced schemas, more useful as standalone documents\n* vX.Y.Z-local - relative references, useful to avoid the network dependency\n\n\n## Example\n\nHere are the links to the latest `deployment` schemas for OpenShift 1.5.1:\n\n* [v1.5.1/deployment.json](v1.5.1/deployment.json)\n* [v1.5.1-standalone/deployment.json](v1.5.1-standalone/deployment.json)\n* [v1.5.1-local/deployment.json](v1.5.1-local/deployment.json)\n\n## Usage\n\nThere are lots of use cases for these schemas, they are primarily useful as a\nlow-level part of other developer workflow tools. But at a most basic level you can\nvalidate a definition file.\n\nHere is a very simply example using the Python [jsonschema client](https://github.com/Julian/jsonschema) and an invalid deployment file:\n\n```\n$ jsonschema -F \"{error.message}\" -i hello-nginx.json 1.5.1-standalone/deployment.json\nu'template' is a required property\n```\n\n## Specific ideas\n\nAs noted these schemas have lots of potential uses for development\ntools. Here are a few ideas, some of which I've been hacking on:\n\n* Demonstrating using with the more common YAML serialisation\n* Testing tools to show your Kubernetes configuration files are valid,\n  and against which versions of Kubernetes\n* Migration tools to check your config files are still valid against\n  master or beta releases\n* Integration with code editors, for instance via something like [Schema\n  Store](http://schemastore.org/json/)\n* Validation of Kubernetes configs generated by higher-level tools, like\n  Helm, Ksonnet or Puppet\n* Visual tools for crafting Kubernetes configurations\n* Tools to show changes between Kubernetes versions\n\n\n## Prior-art\n\nThe discussion around wanting JSON Schemas for Kubernetes types has\ncropped up in a few places, but there are some useful comments on [this\nissue](https://github.com/kubernetes/kubernetes/issues/14987).\n[Joël Harkes](https://github.com/joelharkes) reached a [similar\nconclusion](https://github.com/jbeda/kubernetes-detached/tree/master/api/doc)\nto the approach I ended up taking.\n\n\n## Building the schemas yourself\n\nThe tooling for generating these schemas is [openapi2jsonschema](https://github.com/garethr/openapi2jsonschema). \nIt's not Kubernetes specific and should work with other OpenAPI specificied\nAPIs too. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarethr%2Fopenshift-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarethr%2Fopenshift-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarethr%2Fopenshift-json-schema/lists"}