Skip to content

Commit

Permalink
fix: enusre the creaion of unknown-interface ref schema when input is…
Browse files Browse the repository at this point in the history
… nil
  • Loading branch information
dylanhitt committed Jul 1, 2024
1 parent e223d43 commit e2c7d3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ type schemaTag struct {

func schemaTagFromType[V any](s *Server, v any) schemaTag {
if v == nil {
// ensure we add unknown-interface to our schemas
s.getOrCreateSchema("unknown-interface", struct{}{})
return schemaTag{
name: "unknown-interface",
SchemaRef: openapi3.SchemaRef{
Expand Down

0 comments on commit e2c7d3f

Please sign in to comment.