|
| __construct (protected string string $name, protected string|null ?string $summary=null, protected string|null ?string $description=null, protected mixed mixed $value=null, protected string|null ?string $externalvalue=null,... $extra,) |
| Create a new example.
|
|
| get_name () |
| Get the name of this example.
|
|
| 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.
|
|
◆ __construct()
core\router\schema\example::__construct |
( |
protected string string | $name, |
|
|
protected string|null ?string | $summary = null, |
|
|
protected string|null ?string | $description = null, |
|
|
protected mixed mixed | $value = null, |
|
|
protected string|null ?string | $externalvalue = null, |
|
|
| ... ) |
Create a new example.
- Parameters
-
string | $name | The name of the example. |
string | null | $summary | A summary of the example. |
string | null | $description | A long description fo the example. CommonMark syntax may be used. |
mixed | $value | Embedded literal example. |
string | null | $externalvalue | A URI that points to the literal example. |
| mixed | ...$extra |
- Exceptions
-
coding_exception | if both the value and externalvalue are null |
- Parameters
-
$name | The name of the example |
$summary | A summary of the example |
$description | A long description fo the example. CommonMark syntax may be used |
$value | Embedded literal example. |
The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
- Parameters
-
$externalvalue | A URI that points to the literal example. |
This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References.
◆ escape_reference()
static core\router\schema\openapi_base::escape_reference |
( |
string | $reference | ) |
|
|
staticinherited |
◆ get_name()
core\router\schema\example::get_name |
( |
| ) |
|
Get the name of this example.
- Return values
-
◆ get_openapi_description()
core\router\schema\example::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
-
The documentation for this class was generated from the following file:
- lib/classes/router/schema/example.php