Skip to content

Commit

Permalink
Move header schemas to a dedicated namespace to avoid conflicting wit…
Browse files Browse the repository at this point in the history
…h JSON schemas
  • Loading branch information
vearutop committed May 28, 2020
1 parent 2c57d8e commit b4a7430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openapi3/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (r *Reflector) parseResponseHeader(output interface{}) (map[string]HeaderOr
res := make(map[string]HeaderOrRef)

_, err := r.Reflect(output,
jsonschema.DefinitionsPrefix("#/components/schemas/"),
jsonschema.DefinitionsPrefix("#/components/schemas/header"),
jsonschema.CollectDefinitions(r.collectDefinition),
jsonschema.PropertyNameTag("header"),
jsonschema.InterceptProperty(func(name string, field reflect.StructField, propertySchema *jsonschema.Schema) error {
Expand Down

0 comments on commit b4a7430

Please sign in to comment.