Skip to content

Commit b4a7430

Browse files
committed
Move header schemas to a dedicated namespace to avoid conflicting with JSON schemas
1 parent 2c57d8e commit b4a7430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi3/reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func (r *Reflector) parseResponseHeader(output interface{}) (map[string]HeaderOr
225225
res := make(map[string]HeaderOrRef)
226226

227227
_, err := r.Reflect(output,
228-
jsonschema.DefinitionsPrefix("#/components/schemas/"),
228+
jsonschema.DefinitionsPrefix("#/components/schemas/header"),
229229
jsonschema.CollectDefinitions(r.collectDefinition),
230230
jsonschema.PropertyNameTag("header"),
231231
jsonschema.InterceptProperty(func(name string, field reflect.StructField, propertySchema *jsonschema.Schema) error {

0 commit comments

Comments
 (0)