1Mojolicious::Plugin::OpUesneArPIC:o:nPtarriabmuetMteoedjrosPl(ei3rc)lioDuosc:u:mPelnutgaitni:o:nOpenAPI::Parameters(3)
2
3
4

NAME

6       Mojolicious::Plugin::OpenAPI::Parameters - Methods for transforming
7       data from/to JSON::Validator::Schema
8

DESCRIPTION

10       Mojolicious::Plugin::OpenAPI::Parameters adds helpers to your
11       Mojolicious application, required by Mojolicious::Plugin::OpenAPI.
12       These helpers can be redefined in case you have special needs.
13

HELPERS

15   openapi.build_response_body
16         $bytes = $c->openapi->build_response_body(Mojo::Asset->new);
17         $bytes = $c->openapi->build_response_body($data);
18
19       Takes validated data and turns it into bytes that will be used as HTTP
20       response body. This method is useful to override, in case you want to
21       render some other structure than JSON.
22
23   openapi.build_schema_request
24         $hash_ref = $c->openapi->build_schema_request;
25
26       Builds input data for "validate_request" in
27       JSON::Validator::Schema::OpenAPIv2.
28
29   openapi.build_schema_response
30         $hash_ref = $c->openapi->build_schema_response;
31
32       Builds input data for "validate_response" in
33       JSON::Validator::Schema::OpenAPIv2.
34
35   openapi.coerce_request_parameters
36         $c->openapi->coerce_request_parameters(\@evaluated_parameters);
37
38       Used by Mojolicious::Plugin::OpenAPI to write the validated data back
39       to "req" in Mojolicious::Controller and "output" in
40       Mojolicious::Validator::Validation.
41
42   openapi.coerce_response_parameters
43         $c->openapi->coerce_response_parameters(\@evaluated_parameters);
44
45       Used by Mojolicious::Plugin::OpenAPI to write the validated data to
46       "res" in Mojolicious::Controller.
47
48   openapi.parse_request_body
49         $hash_ref = $c->openapi->parse_request_body;
50
51       Returns a structure representing the request body. The default is to
52       parse the input as JSON:
53
54         {content_type => "application/json", exists => !!$c->req->body_size, value => $c->req->json};
55
56       This method is useful to override, in case you want to parse some other
57       structure than JSON.
58

METHODS

60   register
61         $self->register($app, \%config);
62
63       This method will add the "HELPERS" to your Mojolicious $app.
64

SEE ALSO

66       Mojolicious::Plugin::OpenAPI.
67
68
69
70perl v5.34.0                      20M2o2j-o0l1i-c2i1ous::Plugin::OpenAPI::Parameters(3)
Impressum