Open
Conversation
Keats
reviewed
Nov 28, 2022
| :param Flask app: Flask application | ||
| :param spec_kwargs: kwargs to pass to internal APISpec instance | ||
| :param str config_prefix: Should be used if the user is planning to use | ||
| multiple `Api`'s in the single app. If it is not empty then |
| return flask.render_template( | ||
| "swagger_ui.html", | ||
| title=self.spec.title, | ||
| spec_url=flask.url_for(f"{self._get_doc_blueprint_name()}.openapi_json"), |
Collaborator
Author
There was a problem hiding this comment.
The only restriction to a blueprint's name is that period ('.') is not allowed. And config_prefix will not work with period either.
| return getattr(ctx, "config_prefix", "") + key | ||
|
|
||
|
|
||
| def get_config_value(app, ctx, key, default=None): |
There was a problem hiding this comment.
should we always use named params when calling this? The calls look a bit weird
Collaborator
Author
There was a problem hiding this comment.
Good idea. It is not fully clear if app or ctx is suppose to go first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE
This PR is created here just to collect feadback.