Last active
March 5, 2020 09:32
-
-
Save gbertoncelli/e55d9bbeac3621e241eb8ba4b11fbcd3 to your computer and use it in GitHub Desktop.
OAS3 generator does not correctly implement the nested additionalProperties of this schema.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"components": { | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"diagnostic200": { | |
"description": "200 OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/diagnosticReport" | |
} | |
} | |
} | |
} | |
}, | |
"schemas": { | |
"diagnosticReport": { | |
"type": "object", | |
"properties": { | |
"nodesStatus": {}, | |
// HERE the ISSUE | |
"servicesStatus": { | |
"type": "object", | |
"description": "Describes current services status by node", | |
// THIS IS OK | |
"additionalProperties": { | |
"type": "object", | |
// HERE the internal object is described as 'object' | |
// and not as {available: boolean} | |
"additionalProperties": { | |
"type": "object", | |
"properties": { | |
"available": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"systemStatus": {}, | |
"systemErrors": {} | |
}, | |
"additionalProperties": false, | |
"description": "Diagnostic report of the system" | |
} | |
} | |
}, | |
"paths": { | |
"/diagnostic": { | |
"get": { | |
"operationId": "getStatus", | |
"summary": "Get system status, available nodes and services", | |
"responses": { | |
"200": { | |
"$ref": "#/components/responses/diagnostic200" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment