mirror of
https://github.com/NorfairKing/autodocodec.git
synced 2024-11-26 16:06:31 +03:00
OpenAPI schemas for maps should indicate they are objects
This commit is contained in:
parent
00649ce417
commit
6bdfb8d27c
@ -6,7 +6,8 @@
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,8 @@
|
||||
"(KeyMap Value)": {
|
||||
"additionalProperties": {
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -67,7 +67,8 @@ declareNamedSchemaVia c' Proxy = evalStateT (go c') mempty
|
||||
pure $
|
||||
NamedSchema Nothing $
|
||||
mempty
|
||||
{ _schemaAdditionalProperties = Just $ AdditionalPropertiesSchema $ _namedSchemaSchema <$> itemsSchemaRef
|
||||
{ _schemaType = Just OpenApiObject,
|
||||
_schemaAdditionalProperties = Just $ AdditionalPropertiesSchema $ _namedSchemaSchema <$> itemsSchemaRef
|
||||
}
|
||||
MapCodec c -> do
|
||||
itemsSchema <- go c
|
||||
@ -75,7 +76,8 @@ declareNamedSchemaVia c' Proxy = evalStateT (go c') mempty
|
||||
pure $
|
||||
NamedSchema Nothing $
|
||||
mempty
|
||||
{ _schemaAdditionalProperties = Just $ AdditionalPropertiesSchema $ _namedSchemaSchema <$> itemsSchemaRef
|
||||
{ _schemaType = Just OpenApiObject,
|
||||
_schemaAdditionalProperties = Just $ AdditionalPropertiesSchema $ _namedSchemaSchema <$> itemsSchemaRef
|
||||
}
|
||||
ValueCodec ->
|
||||
pure $
|
||||
|
Loading…
Reference in New Issue
Block a user