Skip to content

Commit

Permalink
- fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Nabais committed Sep 12, 2023
1 parent 78a63b5 commit 93d9fcd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/nested/nested.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type (
// Plant represents the plants the user might have and serves as a test
// of structs inside a `type` set.
Plant struct {
Variant string `json:"variant" jsonschema:"title=Variant"` // This comment will be ignored
Variant string `json:"variant" jsonschema:"title=Variant"` // This comment will be used
// Multicellular is true if the plant is multicellular
Multicellular bool `json:"multicellular,omitempty" jsonschema:"title=Multicellular"` // This comment will be ignored
}
)
8 changes: 7 additions & 1 deletion fixtures/go_comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
"properties": {
"variant": {
"type": "string",
"title": "Variant"
"title": "Variant",
"description": "This comment will be used"
},
"multicellular": {
"type": "boolean",
"title": "Multicellular",
"description": "Multicellular is true if the plant is multicellular"
}
},
"additionalProperties": false,
Expand Down

0 comments on commit 93d9fcd

Please sign in to comment.