marshmallow-code / marshmallow-code/flask-smorest
Multiple representations question
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 717
- Forks
- 77
- Avg merge
- 7h 49m
- Merged PRs (30d)
- 3
Description
Hello,
I'm evaluating flask-smorest to see if it can fit our needs. I would like to set several representations (json,csv,xml, etc.) So far, it looks like json is the core representation. If I override the response decorator to handle my logic of fetching the correct representation, How can I adapt the representations so that it appears correctly in the doc as well (redoc or swagger).
I guess to have to understand the whole swagger specs to adapt it accordingly, correct?
If it is not there yet, I think it would be nice feature to have a way to register representations at blueprint level or resource level depending on the context.
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
No implementation file or test is named. Start by tracing the response decorator and the Swagger/OpenAPI documentation path, then examine how blueprint- or resource-level registration could cover JSON, CSV, and XML. Done means the supported representations are configurable and appear correctly in generated Redoc or Swagger documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, openapi, python
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100