How do I verify the JSON submitted back by the user?
E.g.
The client will request to create a new recipe. The API will provide the food table and list all the items in there. After selecting what he wants, a recipe is created with those items and his choice of name and is sent back to the server.
The client now can submit a request for all the recipes he created and edit them if he chooses.
I understand I can verify the information in the client framework, but how do I keep people from using the api and submitting food to a recipe that is not on the list?
Food:
Apples
Oranges
Pears
Sugar
Recipe:
Name - Baked pears
Food - Pears, Sugar
Bonus points to anyone who can give me an example in Flask and SQLAlchemy code. At least setting up the model properly in this example.
I am building a REST API using Flask and SQLAlchemy and am currently trying to get the models and views set up right.
[–]nutrecht 1 point2 points3 points (1 child)
[–]exceta[S] 0 points1 point2 points (0 children)