phoenix_swagger icon indicating copy to clipboard operation
phoenix_swagger copied to clipboard

Swagger UI configuration

Open aubsw opened this issue 7 years ago • 3 comments

Is there a way to configure #swagger UI options outside of URL params?

https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md

Also, is there a way to inject CSS stylings?

E.g. from https://github.com/ostranme/swagger-ui-themes

aubsw avatar May 16 '18 19:05 aubsw

Is there a way to configure #swagger UI options outside of URL params?

Not really, the code to initialize swagger-ui is baked into the plug: https://github.com/xerions/phoenix_swagger/blob/master/lib/phoenix_swagger/plug/swaggerui.ex#L102-L125

Would you like to submit a PR adding some more options that can be configured?

mbuhot avatar May 18 '18 08:05 mbuhot

👍yep will try to have a look in the next couple weeks

On Fri, May 18, 2018, 1:32 AM Mike Buhot [email protected] wrote:

Is there a way to configure #swagger UI options outside of URL params?

Not really, the code to initialize swagger-ui is baked into the plug: https://github.com/xerions/phoenix_swagger/blob/master/lib/phoenix_swagger/plug/swaggerui.ex#L102-L125

Would you like to submit a PR adding some more options that can be configured?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xerions/phoenix_swagger/issues/183#issuecomment-390135832, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ7WxB8mY1fBl09o0qLXuOGo_qERZfNtks5tzocQgaJpZM4UB3U4 .

aubsw avatar May 18 '18 12:05 aubsw

Would also find it useful to specify Swagger UI options such as defaultModelRendering. https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#display

nathany avatar Jul 23 '18 22:07 nathany