Package io.muserver.openapi
Class LicenseObjectBuilder
- java.lang.Object
-
- io.muserver.openapi.LicenseObjectBuilder
-
public class LicenseObjectBuilder extends java.lang.Object
License information for the exposed API.
-
-
Constructor Summary
Constructors Constructor Description LicenseObjectBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LicenseObject
Apache2_0()
LicenseObject
build()
static LicenseObjectBuilder
licenseObject()
Creates a builder for aLicenseObject
static LicenseObject
MITLicense()
static LicenseObject
TheUnlicense()
LicenseObjectBuilder
withName(java.lang.String name)
LicenseObjectBuilder
withUrl(java.net.URI url)
-
-
-
Method Detail
-
withName
public LicenseObjectBuilder withName(java.lang.String name)
- Parameters:
name
- REQUIRED. The license name used for the API.- Returns:
- The current builder
-
withUrl
public LicenseObjectBuilder withUrl(java.net.URI url)
- Parameters:
url
- A URL to the license used for the API.- Returns:
- The current builder
-
build
public LicenseObject build()
- Returns:
- A new object
-
licenseObject
public static LicenseObjectBuilder licenseObject()
Creates a builder for aLicenseObject
- Returns:
- A new builder
-
Apache2_0
public static LicenseObject Apache2_0()
- Returns:
- A license with name "Apache 2.0" and URL http://www.apache.org/licenses/LICENSE-2.0.html
-
MITLicense
public static LicenseObject MITLicense()
- Returns:
- A license with name "MIT License" and URL https://opensource.org/licenses/mit-license.php
-
TheUnlicense
public static LicenseObject TheUnlicense()
- Returns:
- A license with name "The Unlicense" and URL https://unlicense.org
-
-