-
n addition to the value of the schema in the JSON of the response, other fields need to be added.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
You might need to bring your full function code and goal details |
Beta Was this translation helpful? Give feedback.
-
It looks like you're wanting some fancier response for paginated data. In MDN, I did this here: https://github.com/mdn/kuma/blob/main/kuma/api/v1/pagination.py It's a bit to digest, but the key parts are to look at an implementation like here: The key points are:
The paginated response uses a generic so you can have the same base response class for different schema types, since the schema is the unique bit for different endpoints. |
Beta Was this translation helpful? Give feedback.
-
I implemented this function by override create_response(), thanks for SmileyChris, and vitalik help.
|
Beta Was this translation helpful? Give feedback.
I implemented this function by override create_response(), thanks for SmileyChris, and vitalik help.