public class ExampleObjectBuilder extends Object
Constructor and Description |
---|
ExampleObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
ExampleObject |
build() |
static ExampleObjectBuilder |
exampleObject()
Creates a builder for an
ExampleObject |
ExampleObjectBuilder |
withDescription(String description) |
ExampleObjectBuilder |
withExternalValue(URI externalValue) |
ExampleObjectBuilder |
withSummary(String summary) |
ExampleObjectBuilder |
withValue(Object value) |
public ExampleObjectBuilder withSummary(String summary)
summary
- Short description for the example.public ExampleObjectBuilder withDescription(String description)
description
- Long description for the example. CommonMark syntax
MAY be used for rich text representation.public ExampleObjectBuilder withValue(Object value)
value
- Embedded literal example. The value
field and externalValue
field 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.public ExampleObjectBuilder withExternalValue(URI externalValue)
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. The value
field
and externalValue
field are mutually exclusive.public ExampleObject build()
public static ExampleObjectBuilder exampleObject()
ExampleObject
Copyright © 2017–2018. All rights reserved.