mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-10 23:14:17 +00:00
Support for CRDs
This commit is contained in:
parent
f7bfd2c960
commit
b4995aa02c
11 changed files with 237 additions and 39 deletions
|
|
@ -65,6 +65,31 @@ lastName: bar
|
|||
}`),
|
||||
fmt.Errorf("Invalid type. Expected: number, given: string"),
|
||||
},
|
||||
{
|
||||
"missing required field",
|
||||
[]byte(`
|
||||
firstName: foo
|
||||
`),
|
||||
[]byte(`{
|
||||
"title": "Example Schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"firstName": {
|
||||
"type": "string"
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"description": "Age in years",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": ["firstName", "lastName"]
|
||||
}`),
|
||||
fmt.Errorf("lastName is required"),
|
||||
},
|
||||
{
|
||||
"resource has invalid yaml",
|
||||
[]byte(`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue