Package io.muserver.openapi
Class ExampleObjectBuilder
- java.lang.Object
-
- io.muserver.openapi.ExampleObjectBuilder
-
public class ExampleObjectBuilder extends java.lang.ObjectA builder forExampleObjectobjects
-
-
Constructor Summary
Constructors Constructor Description ExampleObjectBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExampleObjectbuild()static ExampleObjectBuilderexampleObject()Creates a builder for anExampleObjectExampleObjectBuilderwithDescription(java.lang.String description)ExampleObjectBuilderwithExternalValue(java.net.URI externalValue)ExampleObjectBuilderwithSummary(java.lang.String summary)ExampleObjectBuilderwithValue(java.lang.Object value)
-
-
-
Method Detail
-
withSummary
public ExampleObjectBuilder withSummary(java.lang.String summary)
- Parameters:
summary- Short description for the example.- Returns:
- The current builder
-
withDescription
public ExampleObjectBuilder withDescription(java.lang.String description)
- Parameters:
description- Long description for the example. CommonMark syntax MAY be used for rich text representation.- Returns:
- The current builder
-
withValue
public ExampleObjectBuilder withValue(java.lang.Object value)
- Parameters:
value- Embedded literal example. Thevaluefield andexternalValuefield are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.- Returns:
- The current builder
-
withExternalValue
public ExampleObjectBuilder withExternalValue(java.net.URI externalValue)
- Parameters:
externalValue- A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. Thevaluefield andexternalValuefield are mutually exclusive.- Returns:
- The current builder
-
build
public ExampleObject build()
- Returns:
- A new object
-
exampleObject
public static ExampleObjectBuilder exampleObject()
Creates a builder for anExampleObject- Returns:
- A new builder
-
-