Add Tale status to swagger spec/schema #490
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #358 for more details on what would likely be a more controversial set of changesHow to Test
Preparing
status
property is now part of the full swagger spec generated by the/api/v1/describe
endpoint