marshmallow-code / marshmallow-code/flask-smorest
Allow common headers on Blueprint/MethodView
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 717
- Forks
- 77
- Avg merge
- 7h 49m
- Merged PRs (30d)
- 3
Description
Hi,
I'd like to propose an option to define header schemas on a Blueprint or at least MethodView level.
An example use case would be a context/correlation id - optional headers in the request, whose values can then be used for easier tracking/debugging purposes in logs.
Currently, if I'm not mistaken, to auto-document these, one has to decorate every single endpoint of the API, which is a bit cumbersome and error-prone.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Blueprint and MethodView endpoint schemas are collected and how header schemas are auto-documented. Determine where a schema defined at Blueprint or MethodView level could be applied, then verify that one definition covers its endpoints without decorating each endpoint individually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, openapi, python
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100