miLibris / flask-rest-jsonapi

Flask extension to build REST APIs around JSONAPI 1.0 specification.
http://flask-rest-jsonapi.readthedocs.io
MIT License
597 stars 153 forks source link

Validate Nested Object #98

Closed AntonioRodri closed 5 years ago

AntonioRodri commented 6 years ago

Is there some way to validate nested objects?

I have 2 models, customers and packages. When I send the data to the API, it does not validate the nested data. The strange thing is that data that does not match the validation that I have in the Schema, it discards it without throwing any errors (ValidatorError).

I want to create a package for a client, but if the client does not exist, I want to create it in the same call. I check if the client already exists by his NID. But it only validates the fields in the package.

any idea or example?

akira-dev commented 5 years ago

I think this issue is fixed by this pr #71