Annotation Type ExampleObject

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String description
      Long description for the example.
      Extension[] extensions
      List of extensions to be added to the Example model corresponding to the containing annotation.
      String externalValue
      A URL to point to an external document to be used as an example.
      String name
      A unique name to identify this particular example in a map.
      String ref
      Reference value to an Example object.
      String summary
      A brief summary of the purpose or context of the example
      String value
      A string representation of the example.
    • Element Detail

      • name

        String name
        A unique name to identify this particular example in a map.

        The name is REQUIRED when the example is defined within Components. The name will be used as the key to add this example to the 'examples' map for reuse.

        Returns:
        the name of this example
        Default:
        ""
      • summary

        String summary
        A brief summary of the purpose or context of the example
        Returns:
        a summary of this example
        Default:
        ""
      • description

        String description
        Long description for the example. CommonMark syntax MAY be used for rich text representation.
        Returns:
        a description of this example
        Default:
        ""
      • value

        String value
        A string representation of the example.

        This is mutually exclusive with the externalValue property, and ignored if the externalValue property is specified.

        If the media type associated with the example allows parsing into an object, it may be converted from a string.
        Returns:
        the value of the example
        Default:
        ""
      • externalValue

        String externalValue
        A URL to point to an external document to be used as an example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents.

        This is mutually exclusive with the value property.

        Returns:
        an external URL of the example
        Default:
        ""
      • ref

        String ref
        Reference value to an Example object.

        This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.

        Returns:
        reference to an example
        Default:
        ""
      • extensions

        Extension[] extensions
        List of extensions to be added to the Example model corresponding to the containing annotation.
        Returns:
        array of extensions
        Since:
        3.1
        Default:
        {}