github.com/alecthomas/jsonschema@v0.0.0-20220216202328-9eeeec9d044b/examples/nested/nested.go (about)

     1  package nested
     2  
     3  // Pet defines the user's fury friend.
     4  type Pet struct {
     5  	// Name of the animal.
     6  	Name string `json:"name" jsonschema:"title=Name"`
     7  }
     8  
     9  type (
    10  	// Plant represents the plants the user might have and serves as a test
    11  	// of structs inside a `type` set.
    12  	Plant struct {
    13  		Variant string `json:"variant" jsonschema:"title=Variant"` // This comment will be ignored
    14  	}
    15  )