| Swagger2::Guides::CustomPlaceholder(3pm) | User Contributed Perl Documentation | Swagger2::Guides::CustomPlaceholder(3pm) |
NAME¶
Swagger2::Guides::CustomPlaceholder - Custom placeholders
OVERVIEW¶
The default placeholder type is the standard placeholder <https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Routing.pod#Standard-placeholders>, meaning ":". This can be customized using "x-mojo-placeholder" in the API specification. The example in "SYNOPSIS" will enforce a relaxed placeholder <https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Routing.pod#Relaxed-placeholders>.
SYNOPSIS¶
{
"swagger": "2.0",
"basePath": "/api",
"paths": {
"/pets/{name}": {
"get": {
"operationId": "listPets",
"parameters": [
{ "name": "name", "in": "path", "type": "string", "x-mojo-placeholder": "#" }
],
"responses": {
"200": { ... }
}
}
}
}
}
AUTHOR¶
Jan Henning Thorsen - "jhthorsen@cpan.org"
| 2016-04-17 | perl v5.22.1 |