Open akarelas opened 1 month ago
e.g.:
package Example; use v5.40; # ... $self->plugin(OpenAPI => { coerce => 'booleans', spec => { swagger => '2.0', info => { description => "This is the API specification", version => '0.0.1', title => 'abc.karelcom.net', }, schemes => [ 'http' ], paths => { '/api/foo' => { get => { description => 'foo', summary => 'foo', 'x-mojo-to' => 'API#foo', operationId => 'foo', tags => [ 'Foo' ], produces => [ 'application/json' ], responses => { 200 => { description => 'OK. Hi.', schema => { type => 'object', required => [ qw/a b/ ], properties => { a => { type => 'integer' }, b => { type => 'integer' }, }, additionalProperties => false, }, }, }, }, }, }, }, }); # ...
This is important, because you can't use Mojo::JSON 'true', 'false' to replace the meaning of true & false from core booleans, if you use v5.40.
use Mojo::JSON 'true', 'false'
use v5.40
e.g.:
This is important, because you can't
use Mojo::JSON 'true', 'false'
to replace the meaning of true & false from core booleans, if youuse v5.40
.