jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
54 stars 44 forks source link

Need to bundle all responses from SpecRenderer to make OPTIONS render in a more human friendly way #119 #126

Closed jhthorsen closed 5 years ago

jhthorsen commented 5 years ago

I think this PR will fix #119.

Get rid of x-bundled in spec output

Note that this change require JSON-Validator 3.08, which is not yet released. See https://github.com/mojolicious/json-validator/pull/154 for more details.

jhthorsen commented 5 years ago

May I ask you to fix the failing tests first?

I cannot, since it depends on the JSON-Validator changes, as mention in the description.

You can try it out yourself though:

$ cpanm https://github.com/mojolicious/json-validator/archive/feature/improved-bundle.tar.gz
$ cd $REPOS/mojolicious-plugin-openapi
$ git remote update
$ git checkout -b feature/improved-spec origin/feature/improved-spec
$ prove -lj4
jhthorsen commented 5 years ago

@augensalat: I've fixed "__definitions_DefaultResponse" in the latest version of J::V, but there's something wrong with PAUSE, so I cannot upload the new version to pause.

I don't understand what you mean about "pointing to another file is not handled". The test case you link to is invalid, since the $ref is not replaced anymore. It's simply pointing to "/definitions/whatever".