Replies: 3 comments
-
I use https://github.com/marshmallow-code/marshmallow for validation, serialization, and deserialization |
Beta Was this translation helpful? Give feedback.
-
I'm using https://github.com/0b01001001/spectree for OpenAPI doc and validation. The validation part is based on https://github.com/samuelcolvin/pydantic/ |
Beta Was this translation helpful? Give feedback.
-
Hi everyone! (Although Spectree could also go to the Add-on Catalog since it has explicit Falcon support.) |
Beta Was this translation helpful? Give feedback.
-
Greetings,
I am not sure where to post this question? If I should raise it elsewhere please advice.
Building an JSON-restful API with Falcon is pretty straight forward. However what does not fall in the scope of the documentation is backend storage integration and parsing/validation of data. This does not fall within the scope of the Falcon project. The question I have though is how are people validating and storing data from JSON post/patch requests? You can't possibly be writing validation code in each responder (what a waste) and JSON schema doesn't cut it nor does OpenAPI integration (Since its based on json schema validation).. You have to validate the data before storing it or processing some form of transaction. So what approach are the other Falcon developer using here? People that can't afford to write hundreds and thousands of lines of code for many different responders to validate input. I have not yet seen a common approach to this problem and many projects differ, some are even flawed in design. SQLAlchmey is great but it doesn't offer you validation for example for the format of a phone number or email and you don't have always want to store the data in SQL :-) sometimes just validate. So what ever it is, it needs to solve validation and passing it to storage like SQL when needed.
Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions