Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Statically generated API schemas used for CI validation

Notifications You must be signed in to change notification settings

hybrid-cloud-patterns/ocp-schemas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

These are just a couple of scripts to generate static API json files from OpenAPI to validate some of our yaml files in CI without installing a cluster.

Look at the create-schemas.sh for how to install openapi2json to run this script and create the schemas

Notes: Since there are no swagger.json files for ACM around, I just installed it on a 4.9 OCP cluster (ACM 2.4.2) and retrieved all APIs with the following (the jq -S sorts the keys, which helps keep the json changes smaller):

kubectl proxy --port=8080
curl localhost:8080/openapi/v2 | jq -S . > ocp-4.9-acm-2.4.2-clean.json

This file was saved in ocp-acm-schemas/ocp-4.9-acm-2.4.2-clean.json.

OpenShift publishes schemas here:

curl -L -o openshift/swaggers.json https://github.com/openshift/kubernetes/blob/master/api/openapi-spec/swagger.json?raw=true

Argo here:

https://github.com/argoproj/argo-cd/blob/master/assets/swagger.json

About

Statically generated API schemas used for CI validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages