feat: add attribute to schema model

This commit is contained in:
Tristan Cartledge
2023-04-17 12:41:59 +00:00
committed by Dave Shanley
parent 4c331de207
commit 99bf12c1c7
6 changed files with 137 additions and 111 deletions

View File

@@ -150,7 +150,8 @@ examples:
contains:
type: int
maxContains: 10
minContains: 1`
minContains: 1
$anchor: anchor`
}
func Test_Schema(t *testing.T) {
@@ -308,6 +309,7 @@ func Test_Schema(t *testing.T) {
assert.Equal(t, "string", sch.PropertyNames.Value.Schema().Type.Value.A)
assert.Equal(t, "boolean", sch.UnevaluatedItems.Value.Schema().Type.Value.A)
assert.Equal(t, "integer", sch.UnevaluatedProperties.Value.Schema().Type.Value.A)
assert.Equal(t, "anchor", sch.Anchor.Value)
}
func TestSchemaAllOfSequenceOrder(t *testing.T) {