feat: release managed service generation and contract diagnostics

This commit is contained in:
2026-09-24 17:34:21 +08:00
parent eb69260586
commit 158b8002b3
85 changed files with 5722 additions and 360 deletions

View File

@@ -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