Support for CRDs

This commit is contained in:
Yann Hamon 2020-10-16 23:53:41 +02:00
parent f7bfd2c960
commit b4995aa02c
11 changed files with 237 additions and 39 deletions

View file

@ -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(`