feat: release managed service generation and contract diagnostics
This commit is contained in:
@@ -56,14 +56,18 @@ func (c Config) Validate() error {
|
||||
if err := c.Errors.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
if c.ResponseEncoder == nil {
|
||||
encoder := c.ResponseEncoder
|
||||
if encoder == nil {
|
||||
f, err := response.New(c.Response)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = f.ValidateErrors(c.Errors); err != nil {
|
||||
return err
|
||||
}
|
||||
encoder = f
|
||||
}
|
||||
// Check the same composition that App.New installs, including custom
|
||||
// encoders and their existing catalogs, before App construction.
|
||||
if _, err := response.WithErrors(c.Errors, encoder); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := c.Response.Validate(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user