// Operation describes a single API operation on a path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject
//
// Note that this struct is actually a thin wrapper around OperationProps to make it referable and extensible
typeOperationstruct{
OperationProps
spec.VendorExtensible
}
// MarshalJSON is a custom marshal function that knows how to encode Operation as JSON
func(o*Operation)MarshalJSON()([]byte,error){
b1,err:=json.Marshal(o.OperationProps)
iferr!=nil{
returnnil,err
}
b2,err:=json.Marshal(o.VendorExtensible)
iferr!=nil{
returnnil,err
}
returnswag.ConcatJSON(b1,b2),nil
}
// UnmarshalJSON hydrates this items instance with the data from JSON
// OperationProps describes a single API operation on a path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject
typeOperationPropsstruct{
// Tags holds a list of tags for API documentation control
Tags[]string`json:"tags,omitempty"`
// Summary holds a short summary of what the operation does
Summarystring`json:"summary,omitempty"`
// Description holds a verbose explanation of the operation behavior
Descriptionstring`json:"description,omitempty"`
// ExternalDocs holds additional external documentation for this operation