Class MediaTypeObjectBuilder


  • public class MediaTypeObjectBuilder
    extends java.lang.Object
    Each Media Type Object provides schema and examples for the media type identified by its key.
    • Constructor Detail

      • MediaTypeObjectBuilder

        public MediaTypeObjectBuilder()
    • Method Detail

      • withSchema

        public MediaTypeObjectBuilder withSchema​(SchemaObject schema)
        Parameters:
        schema - The schema defining the type used for the request body.
        Returns:
        The current builder
      • withExample

        public MediaTypeObjectBuilder withExample​(java.lang.Object example)
        Parameters:
        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.
        Returns:
        The current builder
      • withExamples

        public MediaTypeObjectBuilder withExamples​(java.util.Map<java.lang.String,​ExampleObject> examples)
        Parameters:
        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.
        Returns:
        The current builder
      • withEncoding

        public MediaTypeObjectBuilder withEncoding​(java.util.Map<java.lang.String,​EncodingObject> encoding)
        Parameters:
        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.
        Returns:
        The current builder