Package io.muserver.openapi
Class PathItemObjectBuilder
- java.lang.Object
-
- io.muserver.openapi.PathItemObjectBuilder
-
public class PathItemObjectBuilder extends java.lang.Object
Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
-
-
Constructor Summary
Constructors Constructor Description PathItemObjectBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PathItemObject
build()
java.util.Map<java.lang.String,OperationObject>
operations()
static PathItemObjectBuilder
pathItemObject()
Creates a builder for aPathItemObject
PathItemObjectBuilder
withDescription(java.lang.String description)
PathItemObjectBuilder
withOperations(java.util.Map<java.lang.String,OperationObject> operations)
PathItemObjectBuilder
withParameters(java.util.List<ParameterObject> parameters)
PathItemObjectBuilder
withServers(java.util.List<ServerObject> servers)
PathItemObjectBuilder
withSummary(java.lang.String summary)
-
-
-
Method Detail
-
withSummary
public PathItemObjectBuilder withSummary(java.lang.String summary)
- Parameters:
summary
- An optional, string summary, intended to apply to all operations in this path.- Returns:
- The current builder
-
withDescription
public PathItemObjectBuilder withDescription(java.lang.String description)
- Parameters:
description
- An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.- Returns:
- The current builder
-
withOperations
public PathItemObjectBuilder withOperations(java.util.Map<java.lang.String,OperationObject> operations)
- Parameters:
operations
- The operations allowed on this path, where the keys to the map areGET
,POST
etc.- Returns:
- The current builder
-
withServers
public PathItemObjectBuilder withServers(java.util.List<ServerObject> servers)
- Parameters:
servers
- An alternative server array to service all operations in this path.- Returns:
- The current builder
-
withParameters
public PathItemObjectBuilder withParameters(java.util.List<ParameterObject> parameters)
- Parameters:
parameters
- A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.- Returns:
- The current builder
-
build
public PathItemObject build()
- Returns:
- A new object
-
pathItemObject
public static PathItemObjectBuilder pathItemObject()
Creates a builder for aPathItemObject
- Returns:
- A new builder
-
operations
public java.util.Map<java.lang.String,OperationObject> operations()
- Returns:
- The value set with
withOperations(java.util.Map<java.lang.String, io.muserver.openapi.OperationObject>)
-
-