Skip to content

Commit

Permalink
fix: don't allow strict-server to be used on its own
Browse files Browse the repository at this point in the history
As it doesn't actually do anything, as it wraps an existing server i.e.
Chi.

Closes #1558.
  • Loading branch information
jamietanna committed May 5, 2024
1 parent a8119c1 commit dc70b54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/codegen/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,10 @@ func (o Configuration) Validate() error {
if nServers > 1 {
return errors.New("only one server type is supported at a time")
}

if o.Generate.Strict && nServers == 0 {
return errors.New("the `strict-server` option is added in addition to another server to be generated. Adding `strict-server` on its own will not generate anything")
}

return nil
}

0 comments on commit dc70b54

Please sign in to comment.