Skip to content

Commit

Permalink
test: add custom schema pointer test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Apr 26, 2024
1 parent 3b95f78 commit 4ee4554
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,23 @@ func TestSchema(t *testing.T) {
"required": ["value"]
}`,
},
{
name: "field-example-custom-pointer",
input: struct {
Value *CustomSchema `json:"value" example:"foo"`
}{},
expected: `{
"type": "object",
"properties": {
"value": {
"type": "string",
"examples": ["foo"]
}
},
"additionalProperties": false,
"required": ["value"]
}`,
},
{
name: "field-enum-custom",
input: struct {
Expand Down

0 comments on commit 4ee4554

Please sign in to comment.