OpenAPI command does not work with specified pet store. Issue #8 said probably fixed in 0.24 but it is not fixed.
Example:
REST server code actually works and can be called from a REST call:
$ ./app get /api/pets
[2020-03-08 13:14:54.65099] [28570] [debug] GET "/api/pets" (9245ecb7)
[2020-03-08 13:14:55.44719] [28570] [debug] Routing to controller "App::Controller::Pet" and action "list"
[2020-03-08 13:14:55.46035] [28570] [debug] 200 OK (0.809346s, 1.236/s)
{ ... JSON I returned from the test function "list" .. }
OpenAPI client command cannot be executed due to validation issue:
$ app openapi /api
[2020-03-08 13:14:01.41765] [28565] [debug] GET "/api" (3635cea4)
[2020-03-08 13:14:01.41832] [28565] [debug] Routing to a callback
[2020-03-08 13:14:01.41971] [28565] [debug] 200 OK (0.002047s, 488.520/s)
Invalid JSON specification HASH(0x5571d8363290):
- /: Properties not allowed: components, openapi, servers. at /usr/local/share/perl/5.28.1/JSON/Validator.pm line 159.
JSON::Validator::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x5571d831bc98), "/api", HASH(0x5571d831bf08)) called at /usr/local/share/perl/5.28.1/JSON/Validator/OpenAPI/Mojolicious.pm line 63
JSON::Validator::OpenAPI::Mojolicious::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x5571d831bc98), "/api", HASH(0x5571d831bf08)) called at /usr/local/share/perl/5.28.1/OpenAPI/Client.pm line 52
OpenAPI::Client::new("OpenAPI::Client", "/api", "app",App=HASH(0x5571d5e201b0)) called at /usr/local/share/perl/5.28.1/Mojolicious/Command/openapi.pm line 57
Mojolicious::Command::openapi::run(Mojolicious::Command::openapi=HASH(0x5571d82e0ff8), "/api") called at /usr/share/perl5/Mojolicious/Commands.pm line 55
Mojolicious::Commands::run(Mojolicious::Commands=HASH(0x5571d83057f0), "openapi", "/api") called at /usr/share/perl5/Mojolicious.pm line 195
Mojolicious::start(App=HASH(0x5571d5e201b0)) called at /usr/share/perl5/Mojolicious/Commands.pm line 72
Mojolicious::Commands::start_app("Mojolicious::Commands", "App") called at ./app line 17
Versions:
Issue:
OpenAPI command does not work with specified pet store. Issue #8 said probably fixed in 0.24 but it is not fixed.
Example:
REST server code actually works and can be called from a REST call:
$ ./app get /api/pets
OpenAPI client command cannot be executed due to validation issue:
$ app openapi /api
$ cat petstore.json