Repository navigation
Resolve minor JSON:API issues - #158
Conversation
593fde6 to
b071632
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #158 +/- ##
==========================================
+ Coverage 89.06% 89.09% +0.02%
==========================================
Files 49 50 +1
Lines 2030 2035 +5
==========================================
+ Hits 1808 1813 +5
Misses 222 222
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b071632 to
a795740
Compare
Bud-Macaulay
left a comment
There was a problem hiding this comment.
A lot of small changes to return types, i guess you were having issues with json api.
Happy to approve if it works on your end.
The return types changes are for consistency. In the original work (#101), I had to change the return type to dict and let it run against the specific response model, instead of returning the model itself, which caused issues due to the abstractness of the JSON:API adapter system. Hence, I found it in general better to return raw dicts and only use Pydantic as a validation gate. |
a795740 to
93aa06c
Compare
Introduce `JsonSchemaResponse` and consolidate response classes under `aiida_restapi.common.responses`.
93aa06c to
fa0fa2d
Compare
This PR refactors and centralizes the handling of JSON:API and JSON
Schema responses throughout the codebase. It introduces new response
classes in a shared module, updates all routers to use these classes,
and moves error handling utilities to a dedicated module. Additionally,
the daemon router endpoints are updated to return plain dictionaries
instead of Pydantic models for status responses.
The PR also fixes a bug in the nodes schema endpoint to ensure the
correct model is selected based on the
whichparameter.