Skip to content

Add Feature to Choose Between Swagger or RapiDoc #576

@NewtTheWolf

Description

@NewtTheWolf

There’s currently a need to add functionality that allows developers to choose whether to use Swagger or RapiDoc as the OpenAPI UI. This is important because the authentication schema in rocket_okapi needs to be modified depending on the chosen UI. The auth schema that works for one (e.g., Swagger) doesn't necessarily work for the other (e.g., RapiDoc), leading to compatibility issues.

Questions:

  1. Can we implement a feature flag or configuration that allows developers to choose between Swagger and RapiDoc?
  2. How can we modify the auth schema dynamically based on which UI is chosen, ensuring it works correctly in both Swagger and RapiDoc?
  3. What’s the best approach to ensure that this selection is simple and doesn’t require significant changes to existing codebases?

Suggestions:

  • Implement a feature flag or configuration option to switch between Swagger and RapiDoc.
  • Adjust the authentication schema in rocket_okapi depending on the selected UI, ensuring compatibility.
  • Once we determine the best approach, I’d be happy to work on the implementation!

I’m opening this issue to gather feedback on how we can best handle this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions