Rework status validations #647
Closed
adamtagscherer
started this conversation in
Ideas
Replies: 3 comments 2 replies
-
One suggestion here is that the common schema be called something like "CommonStatus" so that its obvious that its supposed to be a "base" type not a schema to be used directly. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks @adamtagscherer for putting this proposal together. I am very much in favor of this being implemented. LGTM! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Already done |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
There are multiple API objects (resource clean up, asset scan, asset scanner and there will be a new one with the multi cloud feature) that have a
status
field which is used to determine the resource's health/availability/etc.The format for the
status
field is not unified therefore they have to be threated differently when it comes to validation, state transition, etc.Also currently it is possible to set an asset scan's from
Done
toScheduled
because there is no validation on it.It would be better to have a unified data structure for all the
status
fields.Solution
API model for
status
With the Status object and the
allOf
openapi directive we will be able to create the Statuses for the different API objects.Status transition validation on go code level
Beta Was this translation helpful? Give feedback.
All reactions