feathersjs-ecosystem / feathers-swagger

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

Two DocPaths for separate API groups #229

Closed khazig88 closed 2 years ago

khazig88 commented 2 years ago

Hi,

Is there a way to separate two API groups into different doc paths (e.g. /docs and /docs-v2)? I'm currently using redoc in my docs.html in order to host my docs, but would like a separate doc path for a different API group.

Thanks in advance.

Mairu commented 2 years ago

I have not tested it, but it could be possible by initializing feathers-swagger 2 times with different options.

It would be important to use either include and/or ignore to specify the paths for the different versions, and then use the options docsPath (, docsJsonPath) and appProperty to have different versions.

If that does not work out, it would need to be a feature request for the next version.

Mairu commented 2 years ago

The examples of this repo also are kind of separated API groups.

khazig88 commented 2 years ago

Thanks! Initializing feathers-swagger again worked.