whole-tale / girder_wholetale

Girder plugin providing basic Whole Tale functionality
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Add Tale status to swagger spec/schema #490

Closed bodom0015 closed 3 years ago

bodom0015 commented 3 years ago

Problem

Tale status field is not defined in the Swagger spec, though it is provided in the example value for a Tale.

Approach

Add a definition for the status property to the Tale schema. We should ensure that the attributes required by any clients (UI + worker, at the very least) are defined in the schema in case we ever need to re-generate the code (e.g. when switching frameworks, writing a new client, etc)

Note that even with this change, the Swagger spec produced by /api/v1/describe is not a truly "valid" Swagger spec... see https://github.com/whole-tale/girder_wholetale/issues/358 for more details on what would likely be a more controversial set of changes

How to Test

  1. Checkout and run this branch locally
  2. View https://girder.local.wholetale.org/api/v1/describe
    • You should see the full Swagger spec for this instance of Girder (including the WT and associated plugins) displayed here
  3. Search the Swagger spec for Preparing
    • You should see that the status property is now part of the full swagger spec generated by the /api/v1/describe endpoint
codecov[bot] commented 3 years ago

Codecov Report

Merging #490 (c40e0d9) into master (4ce464d) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #490   +/-   ##
=======================================
  Coverage   92.78%   92.78%           
=======================================
  Files          52       52           
  Lines        3936     3936           
=======================================
  Hits         3652     3652           
  Misses        284      284           
Impacted Files Coverage Δ
server/schema/tale.py 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 4ce464d...c40e0d9. Read the comment docs.