OpenAPI schema endpoint
Requires !759 (merged) — closes #264 (closed)
This adds a new endpoint at /api/v1/schema/
that serves the OpenAPI schema. The custom SchemaGenerator
has been updated to ensure that, unlike DRF's default behavior, endpoints that cannot be accessed by a user are still sent in schemas; this will allow the API client to access the schema immediately without requiring the user to login, or avoid re-downloading and patching its schema on login or logout. This also avoids issues with computed defaults that returned objects such as the local ImageServer as PyYAML !!python/object
tags.
Merge request reports
Activity
assigned to @babadie and unassigned @erwanrouchet
added 10 commits
-
3484d41b...e99b8e18 - 6 commits from branch
master
- b83f3909 - Add cached SchemaView
- 0f9b891b - Prevent user-specific schemas
- 57ec7a94 - Split OpenAPI tests
- 19812cf3 - Add test for the SchemaView
Toggle commit list-
3484d41b...e99b8e18 - 6 commits from branch
- Automatically resolved by Erwan Rouchet
Codecov Report
Merging #760 into master will increase coverage by
0.02%
. The diff coverage is100.00%
.@@ Coverage Diff @@ ## master #760 +/- ## ========================================== + Coverage 86.24% 86.27% +0.02% ========================================== Files 198 200 +2 Lines 13341 13368 +27 ========================================== + Hits 11506 11533 +27 Misses 1835 1835
Impacted Files Coverage Δ arkindex/project/api_v1.py 100.00% <100.00%> (ø)
arkindex/project/openapi/generators.py 100.00% <100.00%> (ø)
arkindex/project/tests/openapi/test_generators.py 100.00% <100.00%> (ø)
arkindex/project/tests/openapi/test_schemas.py 92.92% <100.00%> (ø)
arkindex/project/tests/openapi/test_view.py 100.00% <100.00%> (ø)
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e99b8e1...8e7402c. Read the comment docs.Edited by Bastien Abadie- Automatically resolved by Erwan Rouchet
- Automatically resolved by Erwan Rouchet
mentioned in commit 5ad8bca0