Skip to content

Commit

Permalink
Add unit test coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Lewis <[email protected]>
  • Loading branch information
gmlewis committed Jun 28, 2023
1 parent 3d1d723 commit 28cc7fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fixtures/oneof.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@
},
"child": {
"$ref": "#/$defs/ChildOneOf"
},
"field6": {
"oneOf": [
{
"$ref": "Outer"
},
{
"$ref": "OuterNamed"
},
{
"$ref": "OuterPtr"
}
]
}
},
"additionalProperties": false,
Expand Down
1 change: 1 addition & 0 deletions reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ type RootOneOf struct {
Field3 interface{} `json:"field3" jsonschema:"oneof_type=string;array"`
Field4 string `json:"field4" jsonschema:"oneof_required=group1"`
Field5 ChildOneOf `json:"child"`
Field6 interface{} `json:"field6" jsonschema:"oneof_ref=Outer;OuterNamed;OuterPtr"`
}

type ChildOneOf struct {
Expand Down

0 comments on commit 28cc7fb

Please sign in to comment.