add exampleOption support

This commit is contained in:
colakuma
2022-09-20 18:09:21 +08:00
parent 5d03152780
commit 1f5a0bfcc6
2 changed files with 25 additions and 4 deletions

View File

@ -162,6 +162,7 @@ type swaggerParameterObject struct {
CollectionFormat string `json:"collectionFormat,omitempty"`
Default string `json:"default,omitempty"`
MinItems *int `json:"minItems,omitempty"`
Example string `json:"example,omitempty"`
// Or you can explicitly refer to another type. If this is defined all
// other fields should be empty
@ -171,10 +172,10 @@ type swaggerParameterObject struct {
// core part of schema, which is common to itemsObject and schemaObject.
// http://swagger.io/specification/#itemsObject
type schemaCore struct {
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
Ref string `json:"$ref,omitempty"`
Example json.RawMessage `json:"example,omitempty"`
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
Ref string `json:"$ref,omitempty"`
Example string `json:"example,omitempty"`
Items *swaggerItemsObject `json:"items,omitempty"`
// If the item is an enumeration include a list of all the *NAMES* of the