GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mojolicious::Plugin::OpenAPI::Parameters(3) User Contributed Perl Documentation Mojolicious::Plugin::OpenAPI::Parameters(3)

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

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

  $bytes = $c->openapi->build_response_body(Mojo::Asset->new);
  $bytes = $c->openapi->build_response_body($data);

Takes validated data and turns it into bytes that will be used as HTTP response body. This method is useful to override, in case you want to render some other structure than JSON.

  $hash_ref = $c->openapi->build_schema_request;

Builds input data for "validate_request" in JSON::Validator::Schema::OpenAPIv2.

  $hash_ref = $c->openapi->build_schema_response;

Builds input data for "validate_response" in JSON::Validator::Schema::OpenAPIv2.

  $c->openapi->coerce_request_parameters(\@evaluated_parameters);

Used by Mojolicious::Plugin::OpenAPI to write the validated data back to "req" in Mojolicious::Controller and "output" in Mojolicious::Validator::Validation.

  $c->openapi->coerce_response_parameters(\@evaluated_parameters);

Used by Mojolicious::Plugin::OpenAPI to write the validated data to "res" in Mojolicious::Controller.

  $hash_ref = $c->openapi->parse_request_body;

Returns a structure representing the request body. The default is to parse the input as JSON:

  {content_type => "application/json", exists => !!$c->req->body_size, value => $c->req->json};

This method is useful to override, in case you want to parse some other structure than JSON.

  $self->register($app, \%config);

This method will add the "HELPERS" to your Mojolicious $app.

Mojolicious::Plugin::OpenAPI.

2022-03-24 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.