I'm using ReDoc to visualize API documentation using an OpenAPI 2 (Swagger) JSON file. I'm trying to declare two request input parameters by including the first schema into the second one as follows:
...
"definitions": {
"list-request": {
"type": "object",
"properties": {
"token":{
"type": "string",
"format": "access-token",
"required": true
},
"userId":{
"type": "integer",
"required": true,
"format": "int32"
},
"mode": {
"type": "string",
"required": false,
"default": "lite",
"enum": [
"lite",
"detailed"
]
},
... // other peroperties
},
"xml": {
"name": "list-request"
}
},
"list-request-lite":{
"$ref": "#/definitions/list-request",
"properties":{
"mode": {
"type": "string",
"required": false,
"enum": ["lite"]
}
}
},
...
}
But it does not work - the list-request-lite
schema just shows the mode
property and none of the list-request
schema properties are included. What am I doing wrong?