public class MediaTypeObjectBuilder extends Object
Constructor and Description |
---|
MediaTypeObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
MediaTypeObject |
build() |
static MediaTypeObjectBuilder |
mediaTypeObject()
Creates a builder for a
MediaTypeObject |
MediaTypeObjectBuilder |
withEncoding(Map<String,EncodingObject> encoding) |
MediaTypeObjectBuilder |
withExample(Object example) |
MediaTypeObjectBuilder |
withExamples(Map<String,ExampleObject> examples) |
MediaTypeObjectBuilder |
withSchema(SchemaObject schema) |
public MediaTypeObjectBuilder withSchema(SchemaObject schema)
schema
- The schema defining the type used for the request body.public MediaTypeObjectBuilder withExample(Object example)
example
- Example of the media type. The example object SHOULD be in the correct format as specified by the media type.
The example
field is mutually exclusive of the examples
field.public MediaTypeObjectBuilder withExamples(Map<String,ExampleObject> examples)
examples
- Examples of the media type. Each example object SHOULD match the media type and specified schema if present.
The examples
field is mutually exclusive of the example
field.public MediaTypeObjectBuilder withEncoding(Map<String,EncodingObject> encoding)
encoding
- A map between a property name and its encoding information. The key, being the property name, MUST
exist in the schema as a property. The encoding object SHALL only apply to requestBody
objects when the media type is multipart
or application/x-www-form-urlencoded
.public MediaTypeObject build()
public static MediaTypeObjectBuilder mediaTypeObject()
MediaTypeObject
Copyright © 2017–2018. All rights reserved.