jhthorsen / mojolicious-plugin-openapi

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

Override generate_definitions_path() #152

Closed HEM42 closed 4 years ago

HEM42 commented 4 years ago

in order to render proper OpenAPIv3 spec, overriding of generate_definitions_path() is needed

Latest changes to JSON::Validator makes it possible to render proper OpenAPIv3 specs for references

Reference to #138

HEM42 commented 4 years ago

Updated Guide/OpenAPI3, since this change will fix one of the known issues with file references.

Also included a few tests, to prove when it works, and importantly when it fails to produce proper openapi spec back to the consumers of the api

Hope this helps as well

jhthorsen commented 4 years ago

I'm going to merge this, because I don't know a better way to do it myself at the moment. Also, since the "generate_definitions_path" attribute is EXPERIMENTAL, then we should be able to change this later if a better design arises.

Sorry for the delay. I'll make a new release swiftly.