Interface PathItem
-
- All Superinterfaces:
Constructible,Extensible<PathItem>,Reference<PathItem>
public interface PathItem extends Constructible, Extensible<PathItem>, Reference<PathItem>
PathItemDescribes the operations available on a single path. A Path Item MAY be empty, due to security constraints. In that case the path itself is still exposed to the documentation viewer but you will not know which operations and parameters are available.
- See Also:
- OpenAPI Specification Path Item Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPathItem.HttpMethodAll of the possible types of HTTP operations for this path
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PathItemaddParameter(Parameter parameter)Adds the given parameter to this PathItem's list of parameters.PathItemaddServer(Server server)Adds the given server to this PathItem's list of servers.default PathItemDELETE(Operation delete)Sets this PathItem's delete property to the given operation.default PathItemdescription(String description)Sets this PathItem's description property to the given string.default PathItemGET(Operation get)Sets this PathItem's get property to the given operation.OperationgetDELETE()Returns the delete property from a PathItem instance.StringgetDescription()Returns the description property from a PathItem instance.OperationgetGET()Returns the get property from a PathItem instance.OperationgetHEAD()Returns the head property from a PathItem instance.Map<PathItem.HttpMethod,Operation>getOperations()Returns a map with all the operations for this path where the keys arePathItem.HttpMethoditemsOperationgetOPTIONS()Returns the options property from a PathItem instance.List<Parameter>getParameters()Returns the parameters property from this PathItem instance.OperationgetPATCH()Returns the patch property from a PathItem instance.OperationgetPOST()Returns the post property from a PathItem instance.OperationgetPUT()Returns the put property from a PathItem instance.List<Server>getServers()Returns the servers property from a PathItem instance.StringgetSummary()Returns the summary property from a PathItem instance.OperationgetTRACE()Returns the trace property from a PathItem instance.default PathItemHEAD(Operation head)Sets this PathItem's head property to the given operation.default PathItemOPTIONS(Operation options)Sets this PathItem's options property to the given operation.default PathItemparameters(List<Parameter> parameters)Sets this PathItem's parameters property to the given list.default PathItemPATCH(Operation patch)Sets this PathItem's patch property to the given operation.default PathItemPOST(Operation post)Sets this PathItem's post property to the given operation.default PathItemPUT(Operation put)Sets this PathItem's put property to the given operation.voidremoveParameter(Parameter parameter)Removes the given parameter to this PathItem's list of parameters.voidremoveServer(Server server)Removes the given server to this PathItem's list of servers.default PathItemservers(List<Server> servers)Sets this PathItem's servers property to the given list.voidsetDELETE(Operation delete)Sets this PathItem's delete property to the given operation.voidsetDescription(String description)Sets this PathItem's description property to the given string.voidsetGET(Operation get)Sets this PathItem's get property to the given operation.voidsetHEAD(Operation head)Sets this PathItem's head property to the given operation.voidsetOperation(PathItem.HttpMethod httpMethod, Operation operation)Sets an operation for a given http method.voidsetOPTIONS(Operation options)Sets this PathItem's options property to the given operation.voidsetParameters(List<Parameter> parameters)Sets this PathItem's parameters property to the given list.voidsetPATCH(Operation patch)Sets this PathItem's patch property to the given operation.voidsetPOST(Operation post)Sets this PathItem's post property to the given operation.voidsetPUT(Operation put)Sets this PathItem's put property to the given operation.voidsetServers(List<Server> servers)Sets this PathItem's servers property to the given list.voidsetSummary(String summary)Sets this PathItem's summary property to the given string.voidsetTRACE(Operation trace)Sets this PathItem's trace property to the given operation.default PathItemsummary(String summary)Sets this PathItem's summary property to the given string.default PathItemTRACE(Operation trace)Sets this PathItem's trace property to the given operation.-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
getSummary
String getSummary()
Returns the summary property from a PathItem instance.- Returns:
- a short summary of what the path item represents
-
setSummary
void setSummary(String summary)
Sets this PathItem's summary property to the given string.- Parameters:
summary- short summary of what the path item represents
-
summary
default PathItem summary(String summary)
Sets this PathItem's summary property to the given string.- Parameters:
summary- short summary of what the path item represents- Returns:
- the current PathItem instance
-
getDescription
String getDescription()
Returns the description property from a PathItem instance.- Returns:
- a detailed description of what the path item represents
-
setDescription
void setDescription(String description)
Sets this PathItem's description property to the given string.- Parameters:
description- detailed description of what the path item represents
-
description
default PathItem description(String description)
Sets this PathItem's description property to the given string.- Parameters:
description- detailed description of what the path item represents- Returns:
- the current PathItem instance
-
getGET
Operation getGET()
Returns the get property from a PathItem instance.- Returns:
- definition of a GET operation on this path
-
setGET
void setGET(Operation get)
Sets this PathItem's get property to the given operation.- Parameters:
get- definition of a GET operation
-
GET
default PathItem GET(Operation get)
Sets this PathItem's get property to the given operation.- Parameters:
get- definition of a GET operation- Returns:
- the current PathItem instance
-
getPUT
Operation getPUT()
Returns the put property from a PathItem instance.- Returns:
- definition of a PUT operation on this path
-
setPUT
void setPUT(Operation put)
Sets this PathItem's put property to the given operation.- Parameters:
put- definition of a PUT operation
-
PUT
default PathItem PUT(Operation put)
Sets this PathItem's put property to the given operation.- Parameters:
put- definition of a PUT operation- Returns:
- the current PathItem instance
-
getPOST
Operation getPOST()
Returns the post property from a PathItem instance.- Returns:
- definition of a POST operation on this path
-
setPOST
void setPOST(Operation post)
Sets this PathItem's post property to the given operation.- Parameters:
post- definition of a PUT operation
-
POST
default PathItem POST(Operation post)
Sets this PathItem's post property to the given operation.- Parameters:
post- definition of a PUT operation- Returns:
- the current PathItem instance
-
getDELETE
Operation getDELETE()
Returns the delete property from a PathItem instance.- Returns:
- definition of a DELETE operation on this path
-
setDELETE
void setDELETE(Operation delete)
Sets this PathItem's delete property to the given operation.- Parameters:
delete- definition of a DELETE operation
-
DELETE
default PathItem DELETE(Operation delete)
Sets this PathItem's delete property to the given operation.- Parameters:
delete- definition of a DELETE operation- Returns:
- the current PathItem instance
-
getOPTIONS
Operation getOPTIONS()
Returns the options property from a PathItem instance.- Returns:
- definition of an OPTIONS operation on this path
-
setOPTIONS
void setOPTIONS(Operation options)
Sets this PathItem's options property to the given operation.- Parameters:
options- definition of an OPTIONS operation
-
OPTIONS
default PathItem OPTIONS(Operation options)
Sets this PathItem's options property to the given operation.- Parameters:
options- definition of an OPTIONS operation- Returns:
- the current PathItem instance
-
getHEAD
Operation getHEAD()
Returns the head property from a PathItem instance.- Returns:
- definition of a HEAD operation on this path
-
setHEAD
void setHEAD(Operation head)
Sets this PathItem's head property to the given operation.- Parameters:
head- definition of a HEAD operation
-
HEAD
default PathItem HEAD(Operation head)
Sets this PathItem's head property to the given operation.- Parameters:
head- definition of a HEAD operation- Returns:
- the current PathItem instance
-
getPATCH
Operation getPATCH()
Returns the patch property from a PathItem instance.- Returns:
- definition of a PATCH operation on this path
-
setPATCH
void setPATCH(Operation patch)
Sets this PathItem's patch property to the given operation.- Parameters:
patch- definition of a PATCH operation
-
PATCH
default PathItem PATCH(Operation patch)
Sets this PathItem's patch property to the given operation.- Parameters:
patch- definition of a PATCH operation- Returns:
- the current PathItem instance
-
getTRACE
Operation getTRACE()
Returns the trace property from a PathItem instance.- Returns:
- definition of a TRACE operation on this path
-
setTRACE
void setTRACE(Operation trace)
Sets this PathItem's trace property to the given operation.- Parameters:
trace- definition of a TRACE operation
-
TRACE
default PathItem TRACE(Operation trace)
Sets this PathItem's trace property to the given operation.- Parameters:
trace- definition of a TRACE operation- Returns:
- the current PathItem instance
-
getOperations
Map<PathItem.HttpMethod,Operation> getOperations()
Returns a map with all the operations for this path where the keys arePathItem.HttpMethoditems- Returns:
- a map with all the operations for this path where the keys are HttpMethods
-
setOperation
void setOperation(PathItem.HttpMethod httpMethod, Operation operation)
Sets an operation for a given http method.- Parameters:
httpMethod- the http methodoperation- the definition of an operation for the given http method.
-
getServers
List<Server> getServers()
Returns the servers property from a PathItem instance.- Returns:
- a copy List (potentially immutable) of all the servers defined in this path item
-
setServers
void setServers(List<Server> servers)
Sets this PathItem's servers property to the given list.- Parameters:
servers- a list of the servers to service operations in this path item
-
servers
default PathItem servers(List<Server> servers)
Sets this PathItem's servers property to the given list.- Parameters:
servers- a list of the servers to service operations in this path item- Returns:
- the current PathItem instance
-
addServer
PathItem addServer(Server server)
Adds the given server to this PathItem's list of servers.- Parameters:
server- a server to service operations in this path item- Returns:
- the current PathItem instance
-
removeServer
void removeServer(Server server)
Removes the given server to this PathItem's list of servers.- Parameters:
server- a server to service operations in this path item
-
getParameters
List<Parameter> getParameters()
Returns the parameters property from this PathItem instance.- Returns:
- a copy List (potentially immutable) of parameters that are applicable to all the operations described under this path
-
setParameters
void setParameters(List<Parameter> parameters)
Sets this PathItem's parameters property to the given list.- Parameters:
parameters- a list of parameters that are applicable to all the operations described under this path
-
parameters
default PathItem parameters(List<Parameter> parameters)
Sets this PathItem's parameters property to the given list.- Parameters:
parameters- a list of parameters that are applicable to all the operations described under this path- Returns:
- the current PathItem instance
-
addParameter
PathItem addParameter(Parameter parameter)
Adds the given parameter to this PathItem's list of parameters.- Parameters:
parameter- a parameter that is applicable to all the operations described under this path- Returns:
- the current PathItem instance
-
removeParameter
void removeParameter(Parameter parameter)
Removes the given parameter to this PathItem's list of parameters.- Parameters:
parameter- a parameter that is applicable to all the operations described under this path
-
-