diff --git a/bundle/schema/schema.go b/bundle/schema/schema.go index 1b31119b..e5977a39 100644 --- a/bundle/schema/schema.go +++ b/bundle/schema/schema.go @@ -11,15 +11,15 @@ const MaxHistoryOccurances = 3 // TODO: should omit empty denote non required fields in the json schema? type Schema struct { Type JsType `json:"type"` - Properities map[string]*Property `json:"properities,omitempty"` - AdditionalProperities *Property `json:"additionalProperities,omitempty"` + Properities map[string]*Property `json:"properties,omitempty"` + AdditionalProperities *Property `json:"additionalProperties,omitempty"` } type Property struct { Type JsType `json:"type"` Items *Item `json:"item,omitempty"` - Properities map[string]*Property `json:"properities,omitempty"` - AdditionalProperities *Property `json:"additionalProperities,omitempty"` + Properities map[string]*Property `json:"properties,omitempty"` + AdditionalProperities *Property `json:"additionalProperties,omitempty"` } // TODO: panic for now, add support for adding schemas to $defs in case of cycles diff --git a/bundle/schema/schema_test.go b/bundle/schema/schema_test.go index d981831f..65cf8b53 100644 --- a/bundle/schema/schema_test.go +++ b/bundle/schema/schema_test.go @@ -44,7 +44,7 @@ func TestNumberStringBooleanSchema(t *testing.T) { expected := `{ "type": "object", - "properities": { + "properties": { "bool_val": { "type": "string" }, @@ -119,10 +119,10 @@ func TestObjectSchema(t *testing.T) { expected := `{ "type": "object", - "properities": { + "properties": { "hero": { "type": "object", - "properities": { + "properties": { "age": { "type": "number" }, @@ -133,7 +133,7 @@ func TestObjectSchema(t *testing.T) { }, "plot": { "type": "object", - "properities": { + "properties": { "stakes": { "type": "array", "item": { @@ -144,7 +144,7 @@ func TestObjectSchema(t *testing.T) { }, "villian": { "type": "object", - "properities": { + "properties": { "age": { "type": "number" },