Package io.muserver.openapi
Class InfoObjectBuilder
- java.lang.Object
-
- io.muserver.openapi.InfoObjectBuilder
-
public class InfoObjectBuilder extends java.lang.Object
The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
-
-
Constructor Summary
Constructors Constructor Description InfoObjectBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InfoObject
build()
static InfoObjectBuilder
infoObject()
Creates a builder for aInfoObject
InfoObjectBuilder
withContact(ContactObject contact)
InfoObjectBuilder
withDescription(java.lang.String description)
InfoObjectBuilder
withLicense(LicenseObject license)
InfoObjectBuilder
withTermsOfService(java.net.URI termsOfService)
InfoObjectBuilder
withTitle(java.lang.String title)
InfoObjectBuilder
withVersion(java.lang.String version)
-
-
-
Method Detail
-
withTitle
public InfoObjectBuilder withTitle(java.lang.String title)
- Parameters:
title
- REQUIRED. The title of the application. Default value isAPI Documentation
- Returns:
- The current builder
-
withDescription
public InfoObjectBuilder withDescription(java.lang.String description)
- Parameters:
description
- A short description of the application. CommonMark syntax MAY be used for rich text representation.- Returns:
- The current builder
-
withTermsOfService
public InfoObjectBuilder withTermsOfService(java.net.URI termsOfService)
- Parameters:
termsOfService
- A URL to the Terms of Service for the API.- Returns:
- The current builder
-
withContact
public InfoObjectBuilder withContact(ContactObject contact)
- Parameters:
contact
- The contact information for the exposed API.- Returns:
- The current builder
-
withLicense
public InfoObjectBuilder withLicense(LicenseObject license)
- Parameters:
license
- The license information for the exposed API.- Returns:
- The current builder
-
withVersion
public InfoObjectBuilder withVersion(java.lang.String version)
- Parameters:
version
- REQUIRED. The version of the OpenAPI document. Default value is1.0
- Returns:
- The current builder
-
build
public InfoObject build()
- Returns:
- A new object
-
infoObject
public static InfoObjectBuilder infoObject()
Creates a builder for aInfoObject
- Returns:
- A new builder
-
-