public class OperationBuilder
extends java.lang.Object
Constructor and Description |
---|
OperationBuilder(OperationNameGenerator nameGenerator) |
Modifier and Type | Method and Description |
---|---|
OperationBuilder |
authorizations(java.util.List<SecurityReference> securityReferences)
Updates the security checks that apply to this operation
|
Operation |
build() |
OperationBuilder |
codegenMethodNameStem(java.lang.String codeGenMethodNameStem)
This is an optional override that provides a custom method name stem, such that the method name
that is generated for the purposes of code-gen can be customized.
|
OperationBuilder |
consumes(java.util.Set<java.lang.String> mediaTypes)
Updates the existing media types with new entries that this documentation consumes
|
OperationBuilder |
deprecated(java.lang.String deprecated)
Marks the listing as deprecated
|
OperationBuilder |
extensions(java.util.List<VendorExtension> extensions)
Updates the operation extensions
|
OperationBuilder |
hidden(boolean isHidden)
Marks the operation as hidden
|
OperationBuilder |
method(org.springframework.http.HttpMethod method)
Updates the http method
|
OperationBuilder |
notes(java.lang.String notes)
Updates the operation notes
|
OperationBuilder |
parameters(java.util.List<Parameter> parameters)
Updates the input parameters this operation needs
|
OperationBuilder |
position(int position)
Updates the index of the operation
|
OperationBuilder |
produces(java.util.Set<java.lang.String> mediaTypes)
Updates the existing media types with new entries that this documentation produces
|
OperationBuilder |
protocols(java.util.Set<java.lang.String> protocols)
Update the protocols this operation supports
|
OperationBuilder |
responseMessages(java.util.Set<ResponseMessage> responseMessages)
Updates the response messages
|
OperationBuilder |
responseModel(ModelReference responseType)
Updates the reference to the response model
|
OperationBuilder |
summary(java.lang.String summary)
Updates the operation summary
|
OperationBuilder |
tags(java.util.Set<java.lang.String> tags)
Updates the tags that identify this operation
|
OperationBuilder |
uniqueId(java.lang.String uniqueId)
Updates the uniqueId for the operation.
|
public OperationBuilder(OperationNameGenerator nameGenerator)
public OperationBuilder method(org.springframework.http.HttpMethod method)
method
- - http method, one of GET, POST, PUT etc.public OperationBuilder summary(java.lang.String summary)
summary
- - operation summarypublic OperationBuilder notes(java.lang.String notes)
notes
- - notes to describe the operaitonpublic OperationBuilder uniqueId(java.lang.String uniqueId)
uniqueId
- - uniqueId for the operationpublic OperationBuilder codegenMethodNameStem(java.lang.String codeGenMethodNameStem)
codeGenMethodNameStem
- - provides a stem for the operation name as it will be used for code generationpublic OperationBuilder position(int position)
position
- - position is used to sort the operation in a particular orderpublic OperationBuilder produces(java.util.Set<java.lang.String> mediaTypes)
mediaTypes
- - new media typespublic OperationBuilder consumes(java.util.Set<java.lang.String> mediaTypes)
mediaTypes
- - new media typespublic OperationBuilder protocols(java.util.Set<java.lang.String> protocols)
protocols
- - protocolspublic OperationBuilder authorizations(java.util.List<SecurityReference> securityReferences)
securityReferences
- - authorization that reference security definitionspublic OperationBuilder parameters(java.util.List<Parameter> parameters)
parameters
- - input parameter definitionspublic OperationBuilder responseMessages(java.util.Set<ResponseMessage> responseMessages)
responseMessages
- - new response messages to be merged with existing response messagespublic OperationBuilder deprecated(java.lang.String deprecated)
deprecated
- - surely this had to be a boolean!! TODO!!public OperationBuilder hidden(boolean isHidden)
isHidden
- - boolean flag to indicate that the operation is hiddenpublic OperationBuilder responseModel(ModelReference responseType)
responseType
- = response type model referencepublic OperationBuilder tags(java.util.Set<java.lang.String> tags)
tags
- - new set of tagspublic OperationBuilder extensions(java.util.List<VendorExtension> extensions)
extensions
- - operation extensionspublic Operation build()