mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Determine namespaceability of resources from openapi schema
This commit is contained in:
@@ -38,7 +38,7 @@ metadata:
|
||||
spec:
|
||||
replicas: 3 # {"$ref": "#/definitions/io.k8s.cli.setters.replicas"}
|
||||
`
|
||||
_, err := openapi.AddSchema([]byte(schema)) // add the schema definitions
|
||||
err := openapi.AddSchema([]byte(schema)) // add the schema definitions
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -103,7 +103,7 @@ spec:
|
||||
image: nginx:1.7.9 # {"$ref": "#/definitions/io.k8s.cli.substitutions.image"}
|
||||
`
|
||||
|
||||
_, err := openapi.AddSchema([]byte(schema)) // add the schema definitions
|
||||
err := openapi.AddSchema([]byte(schema)) // add the schema definitions
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@ func initSchema(t *testing.T, s string) {
|
||||
openapi.ResetOpenAPI()
|
||||
|
||||
// add the json schema to the global schema
|
||||
_, err = openapi.AddSchema(j)
|
||||
err = openapi.AddSchema(j)
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user