{
"openapi": "3.0.3",
"info": { "title": "sample_apidir_05", "version": "0.0.1" },
"paths": {
"/option/int-of-string": {
"summary": "int-of-string",
"post": {
"tags": ["option"],
"summary": "int-of-string",
"requestBody": {
"description": "string",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/String" },
"examples": {
"example_0": { "value": "42" },
"example_1": { "value": "" },
"example_2": { "value": "0" },
"example_3": { "value": "2020" },
"example_4": { "value": "a" },
"example_5": { "value": "11.2" }
}
}
},
"required": false
},
"responses": {
"default": {
"description": "ex_alias_int_opt",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ExAliasIntOpt" },
"examples": {
"example_0": { "value": null },
"example_1": { "value": 0 },
"example_2": { "value": 2020 },
"example_3": { "value": null },
"example_4": { "value": null }
}
}
}
}
},
"deprecated": false
}
},
"/option/of-complex": {
"summary": "option-of-complex",
"post": {
"tags": ["option", "complex"],
"summary": "option-of-complex",
"requestBody": {
"description": "ex_coretype_various_complex_types",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExCoretypeVariousComplexTypes"
},
"examples": {
"example_0": {
"value": {
"option": 42,
"list": [1, 2, 3, 4],
"map": { "foo": 4, "bar": 2 }
}
},
"example_1": { "value": { "list": [], "map": {} } }
}
}
},
"required": false
},
"responses": {
"default": {
"description": "ex_alias_int_opt",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ExAliasIntOpt" },
"examples": {
"example_0": { "value": 42 },
"example_1": { "value": null }
}
}
}
}
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"ExAliasIntOpt": {
"title": "ExAliasIntOpt",
"nullable": true,
"type": "integer"
},
"ExCoretypeVariousComplexTypes": {
"title": "ExCoretypeVariousComplexTypes",
"type": "object",
"properties": {
"option": { "nullable": true, "type": "integer" },
"list": { "type": "array", "items": { "type": "integer" } },
"map": {
"type": "object",
"additionalProperties": { "type": "integer" }
}
},
"required": ["list", "map"],
"additionalProperties": false
},
"String": { "title": "String", "type": "string" }
}
}
}