fides icon indicating copy to clipboard operation
fides copied to clipboard

Update validate and generate responses to be consistent

Open earmenda opened this issue 3 years ago • 0 comments
trafficstars

Is your feature request related to a specific problem?

Currently the responses for generate and validate endpoints arent consistent. Creating this ticket so that a common pattern can be established for both

Describe the solution you'd like

Here is the current objects:

class ValidateResponse(BaseModel):
    """
    Validate endpoint response object
    """

    status: ValidationStatus
    message: str
class GenerateResponse(BaseModel):
    """
    The model to house the response for generated infrastructure.
    """

    generate_results: Optional[List[Union[Dataset, System]]]

Ideally we should decide if status and message should be standard fields and then also make sure that http status codes follow the same patterns.

Describe alternatives you've considered, if any

Leave things as is

earmenda avatar Jun 27 '22 21:06 earmenda