feathersjs-ecosystem / feathers-swagger

Add documentation to your FeatherJS services and feed them to Swagger UI.
MIT License
225 stars 63 forks source link

Using $ref #90

Closed gpietro closed 5 years ago

gpietro commented 6 years ago

Is it possible to use $ref with URI instead of definitions?

gpietro commented 6 years ago

I did manage to load refs from local files with json-refs. The problem now is the Promise. json-refs returns a promise and in service.js it doesn't seem to be able to handle it. @daffl What would be the best approach for loading the schema asynchronously? Thanks

Mairu commented 5 years ago

The current version of Swagger UI support URIs from https://swagger.io/docs/specification/using-ref/. This package is only creating json specs. There the uris should be strings and be handled by the consumer. So all local referenced files have also to be served to be reachable (in the browser).