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

Fix using multiple includes with sub-schemas, fixes #56 and #29. #59

Closed Natureshadow closed 7 years ago

Natureshadow commented 7 years ago

Due to the layout of the loop creating the related_schema isntances, all but the last related_include were lost. They are thus now collected in the inital step where all include_paths are evaluated, so that the schema creation code can use the colelcted sub-includes later.

It is still not perfect, because the related_schema is created multiple times and later discarded in some cases, but that's a minor issue and was there before as well. The important thing is that the last schema created is complete now.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.009%) to 95.048% when pulling a000bc776098da313f9cf5c5b2e41e35e59e7fe0 on Natureshadow:issue-56 into 9566f6f9ae371d0e348c8a8804d3b27dcb4dc2c6 on miLibris:master.

akira-dev commented 7 years ago

Thx