diff --git a/LICENSE b/LICENSE index e02fb00b4a..1a8e111b89 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ Kubernetes JSON Schema Copyright (C) 2017 Gareth Rushgrove + Copyright (C) 2017 Yanh Hamon Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..e4ca9eb4dc --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +gen: + ./build.sh \ No newline at end of file diff --git a/README.md b/README.md index 1a32e8260b..c00c1a0887 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Kubernetes JSON Schemas -[![Netlify Status](https://api.netlify.com/api/v1/badges/43819683-5882-4ba3-ba1d-4884fad0033a/deploy-status)](https://app.netlify.com/sites/distracted-benz-b36ced/deploys) - 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 diff --git a/_headers b/_headers deleted file mode 100644 index 5e3ebaa872..0000000000 --- a/_headers +++ /dev/null @@ -1,3 +0,0 @@ -/*.json - Cache-Control: public, max-age=86400 - Access-Control-Allow-Origin: * diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 02573ad28e..0000000000 --- a/build.ps1 +++ /dev/null @@ -1,105 +0,0 @@ - -# This script uses openapi2jsonschema to generate a set of JSON schemas for -# the specified Kubernetes versions in three different flavours: -# -# X.Y.Z - URL referenced based on the specified GitHub repository -# X.Y.Z-standalone - de-referenced schemas, more useful as standalone documents -# X.Y.Z-local - relative references, useful to avoid the network dependency - -$repo="garethr/kubernetes-json-schema" - -$arr = @("v1.12.2", - "v1.12.1", - "v1.12.0", - "v1.11.4", - "v1.11.3", - "v1.11.2", - "v1.11.0", - "v1.10.10", - "v1.10.9", - "v1.10.8", - "v1.10.7", - "v1.10.6", - "v1.10.5", - "v1.10.4", - "v1.10.3", - "v1.10.2", - "v1.10.1", - "v1.10.0", - "v1.9.10", - "v1.9.9", - "v1.9.8", - "v1.9.7", - "v1.9.6", - "v1.9.5", - "v1.9.4", - "v1.9.3", - "v1.9.2", - "v1.9.1", - "v1.9.0", - "v1.8.15", - "v1.8.14", - "v1.8.13", - "v1.8.12", - "v1.8.11", - "v1.8.10", - "v1.8.9", - "v1.8.8", - "v1.8.7", - "v1.8.6", - "v1.8.5", - "v1.8.4", - "v1.8.3", - "v1.8.2", - "v1.8.1", - "v1.8.0", - "v1.7.11", - "v1.7.10", - "v1.7.9", - "v1.7.8", - "v1.7.7", - "v1.7.6", - "v1.7.5", - "v1.7.4", - "v1.7.3", - "v1.7.2", - "v1.7.1", - "v1.7.0", - "v1.6.13", - "v1.6.12", - "v1.6.11", - "v1.6.10", - "v1.6.9", - "v1.6.8", - "v1.6.7", - "v1.6.6", - "v1.6.5", - "v1.6.4", - "v1.6.3", - "v1.6.2", - "v1.6.1", - "v1.6.0", - "v1.5.6", - "v1.5.4", - "v1.5.3", - "v1.5.2", - "v1.5.1", - "v1.5.0") - -foreach($version in $arr) { - $schema="https://raw.githubusercontent.com/kubernetes/kubernetes/${version}/api/openapi-spec/swagger.json" - $prefix="https://raw.githubusercontent.com/${repo}/master/${version}/_definitions.json" - - Remove-Item "$version-standalone-strict" -Recurse -ErrorAction Ignore - Remove-Item "$version-standalone" -Recurse -ErrorAction Ignore - Remove-Item "$version-local" -Recurse -ErrorAction Ignore - Remove-Item "$version" -Recurse -ErrorAction Ignore - docker run --rm -v ${PWD}:/out garethr/openapi2jsonschema -o "$version-standalone-strict" --kubernetes --stand-alone --strict "$schema" - docker run --rm -v ${PWD}:/out garethr/openapi2jsonschema -o "$version-standalone" --kubernetes --stand-alone "$schema" - docker run --rm -v ${PWD}:/out garethr/openapi2jsonschema -o "$version-local" --kubernetes "$schema" - docker run --rm -v ${PWD}:/out garethr/openapi2jsonschema -o "$version" --kubernetes --prefix "$prefix" "$schema" - dos2unix.exe "$version-standalone-strict/*" - dos2unix.exe "$version-standalone/*" - dos2unix.exe "$version-local/*" - dos2unix.exe "$version/*" -}