Currently, JSON responses are constructed as plain Python data structures. As a result, field names are hard-coded for every response. This can lead to differences in keys between responses and between responses and requests.
Instead, the application should create instances of the classes defined in schemas and rely on marshmallow's dump capability to generate the JSON.
Currently, JSON responses are constructed as plain Python data structures. As a result, field names are hard-coded for every response. This can lead to differences in keys between responses and between responses and requests.
Instead, the application should create instances of the classes defined in schemas and rely on marshmallow's dump capability to generate the JSON.