-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix/keyerror-at-fields-to-jsonapi-schema-rendering #46
base: master
Are you sure you want to change the base?
bugfix/keyerror-at-fields-to-jsonapi-schema-rendering #46
Conversation
32d4217
to
89ce44c
Compare
@alidaw Thanks for submitting the issue and the PR! I will take a closer look in the next couple of days. |
The openapi support is really experimental, and I would've preferred the implementation to be done with apispec. Didn't have time to finish it, but I may get a chance to do that soon. If you're passionate about this subject, feel free to have a look at the marshmallow-jsonapi-exp idea. I think a much cleaner solution would be achievable by using apispec instead of the custom logic added in starlette-jsonapi. |
As the field called id according to rules guided by JSON:API is required it's processing must be be excluded in iteration's control structure used to apply requirment state to fields being either child of property called attributes or relationships.
89ce44c
to
a8cba9c
Compare
Thx in advance! I needed to overwrite the commit I applied to fix the issue via interactive rebase. Checking if key called As the field called |
In addition to the commit bearing the bug fix I've added a commit used to expand the unit tests of
The three tests run green. If I comment out the bug fix I've applied, then the tests fail with the same reason ( |
The implementations out for review are used to fix KeyError happening at fields to JSON:API schema rendering due to failing logic applied due iteration. See related issue @ #45.