Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HighSoftWare96/e55d9bbeac3621e241eb8ba4b11fbcd3 to your computer and use it in GitHub Desktop.
Save HighSoftWare96/e55d9bbeac3621e241eb8ba4b11fbcd3 to your computer and use it in GitHub Desktop.
OAS3 generator does not correctly implement the nested additionalProperties of this schema.
{
"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