|
| __construct (protected string string $description='', protected payload_response_type|media_type[] array|payload_response_type $content=[], protected bool bool $required=false,... $args,) |
| Create a new request body.
|
|
| get_body_for_request (ServerRequestInterface $request,) |
| Get the relevant body for the specified request.
|
|
| get_openapi_description (specification $api, ?string $path=null,) |
| Get the OpenAPI data to include in the OpenAPI specification.
|
|
| get_openapi_schema (specification $api, ?string $path=null,) |
| Get the OpenAPI data to include in the OpenAPI specification.
|
|
| get_reference (bool $qualify=true,) |
| Get the $ref for this class.
|
|
| get_schema_from_type (param $type) |
| Get the schema for a given type.
|
|
| is_required () |
| Whether this query parameter is required.
|
|
◆ __construct()
Create a new request body.
- Parameters
-
string | $description | A brief description of the request body. |
payload_response_type | payload_response_type[] | $content | The content of the request body. |
bool | $required | Whether the request body is required |
| mixed | ...$args Extra args for future compatibility. |
- Exceptions
-
coding_exception | if the content is not an instance of media_type. |
- Parameters
-
$description | A brief description of the request body. |
This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
- Parameters
-
$content | The content of the request body. |
$required | Whether the request body is required |
◆ escape_reference()
static core\router\schema\openapi_base::escape_reference |
( |
string | $reference | ) |
|
|
staticinherited |
◆ get_body_for_request()
Get the relevant body for the specified request.
Request bodies can be different for different content-types, as noted in the request.
- Parameters
-
ServerRequestInterface | $request | |
- Return values
-
- Exceptions
-
invalid_parameter_exception | |
◆ get_openapi_description()
core\router\schema\request_body::get_openapi_description |
( |
specification | $api, |
|
|
?string | $path = null ) |
Get the OpenAPI data to include in the OpenAPI specification.
- Parameters
-
specification | $api | |
null | string | $path | |
- Return values
-
Reimplemented from core\router\schema\openapi_base.
◆ get_openapi_schema()
core\router\schema\openapi_base::get_openapi_schema |
( |
specification | $api, |
|
|
?string | $path = null ) |
|
finalinherited |
Get the OpenAPI data to include in the OpenAPI specification.
- Parameters
-
specification | $api | |
null | string | $path | |
- Return values
-
- Exceptions
-
◆ get_reference()
core\router\schema\openapi_base::get_reference |
( |
bool | $qualify = true | ) |
|
|
inherited |
Get the $ref for this class.
- Parameters
-
bool | $qualify | Whether to qualify the reference with the #/components/ part. |
- Return values
-
◆ get_reference_for_class()
static core\router\schema\openapi_base::get_reference_for_class |
( |
string | $classname, |
|
|
bool | $qualify = true ) |
|
staticinherited |
◆ get_reference_for_example()
static core\router\schema\openapi_base::get_reference_for_example |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for an example.
- Parameters
-
- Return values
-
◆ get_reference_for_header()
static core\router\schema\openapi_base::get_reference_for_header |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for a parameter.
- Parameters
-
- Return values
-
◆ get_reference_for_parameter()
static core\router\schema\openapi_base::get_reference_for_parameter |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for a parameter.
- Parameters
-
- Return values
-
◆ get_reference_for_request_body()
static core\router\schema\openapi_base::get_reference_for_request_body |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for a request body.
- Parameters
-
- Return values
-
◆ get_reference_for_response()
static core\router\schema\openapi_base::get_reference_for_response |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for a response.
- Parameters
-
- Return values
-
◆ get_reference_for_schema()
static core\router\schema\openapi_base::get_reference_for_schema |
( |
string | $reference | ) |
|
|
staticinherited |
Get the qualified $ref for a schema.
- Parameters
-
- Return values
-
◆ get_schema_from_type()
core\router\schema\openapi_base::get_schema_from_type |
( |
param | $type | ) |
|
|
inherited |
Get the schema for a given type.
- Parameters
-
- Return values
-
◆ is_required()
core\router\schema\request_body::is_required |
( |
| ) |
|
Whether this query parameter is required.
- Return values
-
The documentation for this class was generated from the following file:
- lib/classes/router/schema/request_body.php