Open spra85 opened 9 months ago
What is wrong about setting that user-friendly string as blueprint name?
I think this is what is do (although I don't put long sentences in there, generally a single work like "User" for the blueprint with user management routes).
The change you propose sounds reasonable but before adding API surface, I'd like to understand current limitation.
Would like to have the option to use a different, more user-friendly name for OpenAPI/Swagger UI Blueprints without needing to change the underlying Flask Blueprint name.
Currently,
register_blueprint
looks for thename
option to be passed in and falls back onBlueprint.name
(see: https://github.com/marshmallow-code/flask-smorest/blob/master/flask_smorest/blueprint.py#L180).Suggestion, something like the below to add a
docs_name
option to use a different name from thename
option, which is also used by theFlaskBlueprint
and materially changes the actual route reference that might be used by Flaskurl_for
.If this is an acceptable solution/idea, I can submit a PR. I could be misinterpreting the appropriate place for this change.