Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the name of the Blueprint configurable #19

Merged

Conversation

barakalon
Copy link

Loving this extension!

This little modification makes the name of the Blueprint a parameter.

I want to have a separate swagger UI endpoint for different versions of the API, e.g. /v1/docs and /v2/docs.

Blueprint names must be unique across all blueprints registered with the application.

@barakalon
Copy link
Author

@sveint Any chance this can get reviewed/released soon?
I'm hoping I don't have to create a fork.

@ghost
Copy link

ghost commented Jul 13, 2018

@barakalon as a workaround you can change name of Bluenprint returned by get_swaggerui_blueprint method. Something like:

v1_api_blueprint = get_swaggerui_blueprint(
    SWAGGER_URL,  # Swagger UI static files will be mapped to '{SWAGGER_URL}/dist/'
    API_URL,
    config={  # Swagger UI config overrides
        'app_name': "Test application"
    }
)
v2_api_blueprint = get_swaggerui_blueprint(
...
)

v1_api_blueprint.name = "v1_api_ui"
v2_api_blueprint.name = "v2_api_ui"

@sveint sveint merged commit b396f61 into sveint:master Aug 10, 2018
@sveint
Copy link
Owner

sveint commented Aug 10, 2018

Awful late reply, sorry about that. Merged now.

@jhinAza jhinAza mentioned this pull request Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants