Skip to content
Snippets Groups Projects

OpenAPI schema endpoint

Merged Erwan Rouchet requested to merge schemaview into master
All threads resolved!

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.

Edited by Erwan Rouchet

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Codecov Report

    Merging #760 into master will increase coverage by 0.02%. The diff coverage is 100.00%.

    Impacted file tree graph

    @@            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
  • Pour l'email de contact: contact@teklia.com c'est mieux

  • Bastien Abadie
  • Bastien Abadie
  • Erwan Rouchet resolved all threads

    resolved all threads

  • Erwan Rouchet added 1 commit

    added 1 commit

    Compare with previous version

  • Erwan Rouchet changed the description

    changed the description

  • Bastien Abadie mentioned in commit 5ad8bca0

    mentioned in commit 5ad8bca0

  • Please register or sign in to reply
    Loading