Class: Yori::Schema::V3::Example

Inherits:
Yori::SchemaBase show all
Defined in:
lib/yori/schema/v3/example.rb

Overview

Example: @summary: Short description for the example. @description: Long description for the example. CommonMark syntax MAY be used for rich text representation. @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. @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.

Instance Attribute Summary

Attributes inherited from Yori::SchemaBase

#id

Instance Method Summary collapse

Methods inherited from Yori::SchemaBase

eval_class!, eval_hash!, eval_input!, #ref, #validator

Instance Method Details

#validate!Object



14
15
16
# File 'lib/yori/schema/v3/example.rb', line 14

def validate!
  validate_mutually_exclusive_fields!('value', 'externalValue')
end