File tree 1 file changed +3
-45
lines changed 1 file changed +3
-45
lines changed Original file line number Diff line number Diff line change @@ -61,51 +61,9 @@ Options:
61
61
62
62
My specific usecase was being able to validate a Kubernetes
63
63
configuration file without a Kubernetes client like ` kubectl ` and
64
- without the server. For that I have a bash script shown below:
65
-
66
- ``` bash
67
- #! /bin/bash -xe
68
-
69
- # This script uses openapi2jsonschema to generate a set of JSON schemas
70
- for
71
- # the specified Kubernetes versions in three different flavours:
72
- #
73
- # X.Y.Z - URL referenced based on the specified GitHub repository
74
- # X.Y.Z-standalone - de-referenced schemas, more useful as standalone
75
- documents
76
- # X.Y.Z-local - relative references, useful to avoid the network
77
- dependency
78
-
79
- REPO=" garethr/kubernetes=json-schema"
80
-
81
- declare -a arr=(1.6.6
82
- 1.6.5
83
- 1.6.4
84
- 1.6.3
85
- 1.6.2
86
- 1.6.1
87
- 1.6.0
88
- 1.5.6
89
- 1.5.4
90
- 1.5.3
91
- 1.5.2
92
- 1.5.1
93
- 1.5.0
94
- )
95
-
96
- for version in " ${arr[@]} "
97
- do
98
- schema=https://raw.githubusercontent.com/kubernetes/kubernetes/v${version} /api/openapi-spec/swagger.json
99
- prefix=https://raw.githubusercontent.com/${REPO} /master/v${version} /_definitions.json
100
-
101
- openapi2jsonschema -o " ${version} -standalone" --stand-alone " ${schema} "
102
- openapi2jsonschema -o " ${version} -local" " ${schema} "
103
- openapi2jsonschema -o " ${version} " " --prefix " ${prefix} " " ${schema} "
104
- done
105
- ` ` `
64
+ without the server. For that I have a bash script,
65
+ [ available here] ( https://github.com/instrumenta/kubernetes-json-schema/blob/master/build.sh ) .
106
66
107
67
The output from running this script can be seen in the accompanying
108
- [garethr/kubernetes-json-schema](https://github.com/garethr/kubernetes-json-schema).
109
-
110
-
68
+ [ instrumenta/kubernetes-json-schema] ( https://github.com/instrumenta/kubernetes-json-schema ) .
111
69
You can’t perform that action at this time.
0 commit comments