Example, where the ServiceInfo shouldn’t appear in the response schema: type: array items: type: object properties: ServiceInfo: $ref: '#/definitions/ServiceInfo' Should simply be: schema: type: array items: $ref: '#/definitions/ServiceInfo' And schema: type: object properties: ServiceInfo: $ref: '#/definitions/ServiceInfo' Should simply be: schema: $ref: '#/definitions/ServiceInfo'
It's proposed to defer this until the OpenAPI 3.0 descriptions are available, since OpenAPI 2.0 only allows a single return schema. Therefore there's no apparent way to indicate that the return type is optional which is a problem when the return type has a cardinality of 0 to 1 or N, e.g. with respect to ProblemDetails, or even ServiceInfo.