I’ve configured the validator to disallow additional properties. My current issue is that it doesn’t function properly even with basic use of compositions. (Also with any validation at all)
For example, an endpoint returns minified
. This is a composite of allOf
, combining base
and the extra properties. This is the way defined by the Swagger/OpenAPI specification. However, the validator only checks the first entry in the allOf
composition, ignoring any additional, added, or overwritten properties.
https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/
Sorry for the inconvenience, we have not reproduced this issue. Could you provide the version of Apidog you are using and your JSON Schema and error screenshots.
{
"allOf": [
{
"$ref": "#/definitions/4641824"
},
{
"type": "object",
"properties": {
"media": {
"$ref": "#/definitions/4641832"
},
"numFiles": {
"type": "integer",
"description": "The number of files"
},
"size": {
"$ref": "#/definitions/4641830"
}
},
"x-apidog-orders": [
"media",
"numFiles",
"size"
],
"required": [
"size",
"numFiles",
"media"
],
"title": "",
"description": ""
}
],
"description": "A single item on the server, like a book or podcast. Minified media format."
}
I am not sure if this as the case yesterday, but now it just complaints that everything is missing.
I also just see that it generates
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {}
}
},
(So no libraryItemMinified as it acutally should)
Thanks for the feedback, we will think about how to optimize it.