Is it possible to implement extended response
See original GitHub issueHello!
First of all, thank you for such a great library!
I have and old legacy API that returns responses like so:
{
"type": "error",
"kind": "validation",
"message": { ... some message ...} # this is built upon exception text
}
# or
{
"type": "success",
"result": { ... some data ...} # this is what view returns
}
As you can see, the responses have envelope. Is it possible to implement such functionality in pythonic way still using @blp.response decorator?
Error condition can be determined on any exception (or specific like ValidationError to set kind and message fields) and on status method. Same for successful response.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
How an Extended Response Item Can Enhance Learning
Teachers love extended response items because they require students to construct an in-depth response that proves mastery or lack thereof.
Read more >Writing an Extended Response - YouTube
In this video, I explain the four steps to writing an extended response for the GED test:1. Read the passage.2. Plan your response.3....
Read more >How to do an extended response exam - History Skills
How to do an extended response exam ; Contrast, Emphasise the differences ; Discuss, Examine by argument, considering for and against ; Explain,...
Read more >Extended Constructed Response Prompts: 5 Steps for Success
On-demand writing prompts can be stressful and challenging for students. Use these five steps to create extended constructed response ...
Read more >Writing and Answering Extended Response Questions
Practice. ▫ Share with a neighbor. Answer the following question with an extended response: ▫ What did you do this weekend?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
0.9.0 released!
Great to hear! I think it is okay to use current code version and to not to push deeper (yet).
I think issue can be closed after release, i will integrate the code into existing project and test it, it may take some time.
Anyway for me this project is the best (compared to more mature projects), because it uses marshmallow and saves time on writing documentation.
Thanks again!