Skip to content

Commit

Permalink
OpenAPI arrays use 'minItems', not 'minLength'
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok committed Apr 19, 2024
1 parent 3c3eb88 commit 89e9024
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion json-fleece-openapi3/examples/test-cases/test-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -796,4 +796,4 @@ components:
type: array
items:
type: boolean
minLength: 1
minItems: 1
2 changes: 1 addition & 1 deletion json-fleece-openapi3/src/Fleece/OpenApi3.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ mkOpenApiArrayFormat ::
CGU.CodeGen (SchemaMap, CGU.CodeGenDataFormat)
mkOpenApiArrayFormat schemaKey typeName schema = do
typeOptions <- CGU.lookupTypeOptions typeName
fmap (fmap (CGU.CodeGenArray typeOptions (OA._schemaMinLength schema))) $
fmap (fmap (CGU.CodeGenArray typeOptions (OA._schemaMinItems schema))) $
schemaArrayItemsToFieldType
CGU.Type
schemaKey
Expand Down

0 comments on commit 89e9024

Please sign in to comment.