Qore Swagger Module Reference 2.1.1
|
Describes a single response from an API Operation. More...
#include <Swagger.qm.dox.h>
Inherits ObjectBase.
Static Public Member Methods | |
static ResponseObject | newResponse (string key, hash< auto > oh, SwaggerSchema swagger) |
returns a new ResponseObject corresponding to the schema definition passed More... | |
Public Attributes | |
string | desc |
Required. A short description of the response. GFM syntax can be used for rich text representation. | |
hash | examples |
A hash of example response messages. More... | |
hash< auto > | headers |
A hash of headers that are (can be) sent with the response. More... | |
*SchemaObject | schema |
A definition of the response structure. More... | |
Private Member Methods | |
constructor (string key, hash< auto > oh, SwaggerSchema swagger) | |
private constructor; use newResponse() instead More... | |
Describes a single response from an API Operation.
|
private |
private constructor; use newResponse() instead
key | the response code for error reporting |
oh | deserialized hash from the source schema description describing a single response for an API operation |
swagger | the REST schema for resolving references |
INVALID-FIELD-TYPE | field has invalid type |
REQUIRED-FIELD-MISSING | required field is missing |
|
static |
returns a new ResponseObject corresponding to the schema definition passed
key | the response code for the response |
oh | deserialized hash from the source schema description describing a single response for an API operation |
swagger | the REST schema for resolving references |
INVALID-FIELD-TYPE | field has invalid type |
REQUIRED-FIELD-MISSING | required field is missing |
hash ResponseObject::examples |
A hash of example response messages.
A hash of example responses in the form of Example Object
. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#exampleObject Keys MUST be one of the Operation produces values (either implicit or inherited). The value SHOULD be an example of what such a response would look like.
hash<auto> ResponseObject::headers |
A hash of headers that are (can be) sent with the response.
A hash of HeaderObject objects. Keys are header names.
*SchemaObject ResponseObject::schema |
A definition of the response structure.
It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the SchemaObject, its root type
value may also be "file"
. This SHOULD be accompanied by a relevant produces
mime-type.