public class OpenAPIObjectBuilder extends Object
Constructor and Description |
---|
OpenAPIObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
OpenAPIObject |
build() |
static OpenAPIObjectBuilder |
openAPIObject()
Creates a builder for an
OpenAPIObject |
OpenAPIObjectBuilder |
withComponents(ComponentsObject components) |
OpenAPIObjectBuilder |
withExternalDocs(ExternalDocumentationObject externalDocs) |
OpenAPIObjectBuilder |
withInfo(InfoObject info) |
OpenAPIObjectBuilder |
withPaths(PathsObject paths) |
OpenAPIObjectBuilder |
withSecurity(List<SecurityRequirementObject> security) |
OpenAPIObjectBuilder |
withServers(List<ServerObject> servers) |
OpenAPIObjectBuilder |
withTags(List<TagObject> tags) |
public OpenAPIObjectBuilder withInfo(InfoObject info)
info
- REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.public OpenAPIObjectBuilder withServers(List<ServerObject> servers)
servers
- An array of Server Objects, which provide connectivity information to a target server. If the servers
property is not provided, or is an empty array, the default value would be a ServerObject
with a
url
value of /
.public OpenAPIObjectBuilder withPaths(PathsObject paths)
paths
- REQUIRED. The available paths and operations for the API.public OpenAPIObjectBuilder withComponents(ComponentsObject components)
components
- An element to hold various schemas for the specification.public OpenAPIObjectBuilder withSecurity(List<SecurityRequirementObject> security)
security
- A declaration of which security mechanisms can be used across the API. The list of values includes
alternative security requirement objects that can be used. Only one of the security requirement
objects need to be satisfied to authorize a request. Individual operations can override this definition.public OpenAPIObjectBuilder withTags(List<TagObject> tags)
tags
- A list of tags used by the specification with additional metadata. The order of the tags can be used
to reflect on their order by the parsing tools. Not all tags that are used by the OperationObject
must
be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic.
Each tag name in the list MUST be unique.public OpenAPIObjectBuilder withExternalDocs(ExternalDocumentationObject externalDocs)
externalDocs
- Additional external documentation.public OpenAPIObject build()
public static OpenAPIObjectBuilder openAPIObject()
OpenAPIObject
Copyright © 2017–2019. All rights reserved.