chore: update to API spec for new template endpoint response (#362)

This commit is contained in:
Dane Strandboge
2022-02-17 14:46:05 -06:00
committed by GitHub
parent 041ebf65e3
commit 85a33adf71
12 changed files with 422 additions and 96 deletions

View File

@ -81,9 +81,7 @@ func (c Client) Validate(ctx context.Context, params *ValidateParams) error {
}
if apiErr, ok := err.(api.GenericOpenAPIError); ok {
if summary, ok := apiErr.Model().(*api.TemplateSummary); ok {
return fmt.Errorf("template failed validation:\n\t%s", summary)
}
return fmt.Errorf("template failed validation:\n\t%s", apiErr)
}
return fmt.Errorf("failed to validate template: %w", err)
}