Forum Discussion
- HKosovaSmartBear Alumni (Retired)
It depends on the parameter location (in attribute).
Path, query, header, and form parameters in OpenAPI 2.0 require a specific type and cannot have multiple types.
However, in schemas for body parameters and responses, if you don't specify the type a schema, property, or array items schema, it means "any type" . That's the most you can do in OpenAPI 2.0.
definitions: MyModel: type: object properties: id: type: integer example: 1 data: # No "type" means the value can be of any type example: 'custom data' ArrayOfArbitraryValues: type: array items: {} example: ['string', -1, false]
Related Content
- 10 years ago
- 2 years ago
Recent Discussions
- 3 days ago