All Superinterfaces:
Constructible, Map<String,MediaType>

public interface Content extends Constructible, Map<String,MediaType>
Content

A map to assist describing the media types for an operation's parameter or response.

  • Method Details

    • addMediaType

      Content addMediaType(String name, MediaType mediaType)
      Adds the MediaType for this Content, where the key is the name of the MediaType and the value is the object that describes the content passed into or returned from an operation.
      Parameters:
      name - the name of a media type e.g. application/json.
      mediaType - an object that describes the content passed into or returned from an operation.
      Returns:
      the current Content instance