Skip to content

Commit

Permalink
fix(schema): Fix JSON Schema generation commas for InclusivePrimitive…
Browse files Browse the repository at this point in the history
…ItemTypes
  • Loading branch information
jpinkney-aws authored and rubenfonseca committed Apr 26, 2022
1 parent 512508f commit 28db940
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generate/templates/schema-property.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"anyOf": [
{{$length := len .Property.InclusivePrimitiveItemTypes}}{{$rc := counter $length}}{{range $index, $primitiveType := .Property.InclusivePrimitiveItemTypes}}
{
"type": "{{convertToJSONType $primitiveType}}"{{if call $rc}},{{end}}
}{{if $.Property.InclusiveItemTypes}},{{end}}
"type": "{{convertToJSONType $primitiveType}}"
}{{if (or $.Property.InclusiveItemTypes (call $rc))}},{{end}}
{{end}}
{{$length := len .Property.InclusiveItemTypes}}{{$rc := counter $length}}{{range $index, $itemType := .Property.InclusiveItemTypes}}
{
Expand All @@ -29,7 +29,7 @@
{{end}}
]
}
}{{if (or $.Property.InclusivePrimitiveItemTypes $.Property.InclusiveItemTypes)}},{{end}}
}{{if (or $.Property.PrimitiveItemTypes (or $.Property.Types $.Property.ItemTypes))}},{{end}}
{{end}}

{{if .Property.PrimitiveItemTypes}}
Expand Down

0 comments on commit 28db940

Please sign in to comment.