(t *testing.T)
| 26 | } |
| 27 | |
| 28 | func TestKind_JSONSchemaExtend(t *testing.T) { |
| 29 | data, err := jsonschema.Generate(new(Kind)) |
| 30 | require.NoError(t, err) |
| 31 | jsonschema.TestJSONSchema(t, string(data), []jsonschema.TestCase{ |
| 32 | { |
| 33 | Name: "empty", |
| 34 | Err: true, |
| 35 | Spec: `""`, |
| 36 | }, |
| 37 | { |
| 38 | Name: "null", |
| 39 | Err: true, |
| 40 | Spec: `null`, |
| 41 | }, |
| 42 | { |
| 43 | Name: "bad type", |
| 44 | Err: true, |
| 45 | Spec: `123`, |
| 46 | }, |
| 47 | { |
| 48 | Name: "bad value", |
| 49 | Err: true, |
| 50 | Spec: `"extra"`, |
| 51 | }, |
| 52 | { |
| 53 | Name: "source", |
| 54 | Spec: `"source"`, |
| 55 | }, |
| 56 | { |
| 57 | Name: "destination", |
| 58 | Spec: `"destination"`, |
| 59 | }, |
| 60 | }) |
| 61 | } |