Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Feb 3, 2025
1 parent 827114b commit 46b32e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openapi3gen/openapi3gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ func ExampleSchemaCustomizer() {
InnerFieldWithTag int `mymintag:"-1" mymaxtag:"50"`
NestedInnerBla
}
Enum2Field string `json:"enum2" myenumtag:"c,d"`
Enum2Field string `json:"enum2" myenumtag:"c,d"`
JsonField json.RawMessage `json:"rawmsg" myjsontag:"raw"`
}

type Bla struct {
Expand Down Expand Up @@ -435,6 +436,9 @@ func ExampleSchemaCustomizer() {
schema.Enum = append(schema.Enum, s)
}
}
if tag.Get("myjsontag") != "" {
schema.Description = "description"
}
return nil
})

Expand Down Expand Up @@ -487,6 +491,9 @@ func ExampleSchemaCustomizer() {
// "f"
// ],
// "type": "string"
// },
// "rawmsg": {
// "description": "description"
// }
// },
// "type": "object"
Expand Down

0 comments on commit 46b32e3

Please sign in to comment.