Specifying multiple types for additionalProperties through Swagger/OpenAPI
问题 I am looking to represent the following JSON Object in OpenAPI: { "name": "Bob", "age": 4, ... } The number of properties and the property names are not fully predetermined, so I look to use additionalProperties. However, I'm not too certain how it would be represented through OpenAPI/Swagger 2.0. I tried this: Person: type: object additionalProperties: type: - int - string or the JSON equivalent: { "Person": { "type": "object", "additionalProperties": { "type": ["int", "string"] } } } but