Module: Swagger::V2::DeterministicJSONSchema
Overview
A Swagger Schema Object, which is subset of JSON-Schema that’s constrainted to be more deterministic.
Instance Attribute Summary collapse
-
#$ref($ref) ⇒ Object
JSON-Schema field $ref.
-
#default ⇒ Object
JSON-Schema field default.
-
#description ⇒ Object
JSON-Schema field description.
-
#discriminator ⇒ Object
Swagger Schema field discriminator.
-
#enum ⇒ Object
JSON-Schema field enum.
-
#example ⇒ Object
Swagger Schema field example.
-
#exclusiveMaximum ⇒ Object
JSON-Schema field exclusiveMaximum.
-
#exclusiveMinimum ⇒ Object
JSON-Schema field exclusiveMinimum.
-
#externalDocs ⇒ Object
Swagger Schema field externalDocs.
-
#format ⇒ Object
JSON-Schema field format.
-
#maximum ⇒ Object
JSON-Schema field maximum.
-
#maxItems ⇒ Object
JSON-Schema field maxItems.
-
#maxLength ⇒ Object
JSON-Schema field maxLength.
-
#maxProperties ⇒ Object
JSON-Schema field maxProperties.
-
#minimum ⇒ Object
JSON-Schema field minimum.
-
#minItems ⇒ Object
JSON-Schema field minItems.
-
#minLength ⇒ Object
JSON-Schema field minLength.
-
#minProperties ⇒ Object
JSON-Schema field minProperties.
-
#multipleOf ⇒ Object
JSON-Schema field multipleOf.
-
#pattern ⇒ Object
JSON-Schema field pattern.
-
#readOnly ⇒ Object
Swagger Schema field readOnly.
-
#required ⇒ Object
JSON-Schema field required.
-
#title ⇒ Object
JSON-Schema field title.
-
#type ⇒ Object
JSON-Schema field type.
-
#uniqueItems ⇒ Object
JSON-Schema field uniqueItems.
-
#xml ⇒ Object
Swagger Schema field xml.
Instance Attribute Details
#$ref($ref) ⇒ Object
JSON-Schema field $ref.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#default ⇒ Object
JSON-Schema field default.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#description ⇒ Object
JSON-Schema field description.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#discriminator ⇒ Object
Swagger Schema field discriminator.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 93 def self.included(base) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength # Subset of standard JSON schema base.field :$ref, String base.field :format, String base.field :title, String base.field :description, String base.field :default, Object base.field :multipleOf, Numeric base.field :maximum, Numeric base.field :exclusiveMaximum, Swagger::Boolean base.send(:alias_method, :exclusiveMaximum?, :exclusiveMaximum) base.field :minimum, Numeric base.field :exclusiveMinimum, Swagger::Boolean base.send(:alias_method, :exclusiveMinimum?, :exclusiveMinimum) base.field :maxLength, Integer base.field :minLength, Integer base.field :pattern, String base.field :maxItems, Integer base.field :minItems, Integer base.field :uniqueItems, Swagger::Boolean base.send(:alias_method, :uniqueItems?, :uniqueItems) base.field :maxProperties, Integer base.field :minProperties, Integer base.field :required, Swagger::Boolean base.send(:alias_method, :required?, :required) base.field :enum, Array[Object] base.field :type, Object # Swagger extensions to JSON schema :\ base.field :discriminator, String base.field :readOnly, Swagger::Boolean base.field :xml, Object # TODO: Swagger XML object / XML support base.field :externalDocs, Object # TODO: ExternalDocumentation class base.field :example, Object end |
#enum ⇒ Object
JSON-Schema field enum.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#example ⇒ Object
Swagger Schema field example.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 93 def self.included(base) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength # Subset of standard JSON schema base.field :$ref, String base.field :format, String base.field :title, String base.field :description, String base.field :default, Object base.field :multipleOf, Numeric base.field :maximum, Numeric base.field :exclusiveMaximum, Swagger::Boolean base.send(:alias_method, :exclusiveMaximum?, :exclusiveMaximum) base.field :minimum, Numeric base.field :exclusiveMinimum, Swagger::Boolean base.send(:alias_method, :exclusiveMinimum?, :exclusiveMinimum) base.field :maxLength, Integer base.field :minLength, Integer base.field :pattern, String base.field :maxItems, Integer base.field :minItems, Integer base.field :uniqueItems, Swagger::Boolean base.send(:alias_method, :uniqueItems?, :uniqueItems) base.field :maxProperties, Integer base.field :minProperties, Integer base.field :required, Swagger::Boolean base.send(:alias_method, :required?, :required) base.field :enum, Array[Object] base.field :type, Object # Swagger extensions to JSON schema :\ base.field :discriminator, String base.field :readOnly, Swagger::Boolean base.field :xml, Object # TODO: Swagger XML object / XML support base.field :externalDocs, Object # TODO: ExternalDocumentation class base.field :example, Object end |
#exclusiveMaximum ⇒ Object
JSON-Schema field exclusiveMaximum.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#exclusiveMinimum ⇒ Object
JSON-Schema field exclusiveMinimum.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#externalDocs ⇒ Object
Swagger Schema field externalDocs.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 93 def self.included(base) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength # Subset of standard JSON schema base.field :$ref, String base.field :format, String base.field :title, String base.field :description, String base.field :default, Object base.field :multipleOf, Numeric base.field :maximum, Numeric base.field :exclusiveMaximum, Swagger::Boolean base.send(:alias_method, :exclusiveMaximum?, :exclusiveMaximum) base.field :minimum, Numeric base.field :exclusiveMinimum, Swagger::Boolean base.send(:alias_method, :exclusiveMinimum?, :exclusiveMinimum) base.field :maxLength, Integer base.field :minLength, Integer base.field :pattern, String base.field :maxItems, Integer base.field :minItems, Integer base.field :uniqueItems, Swagger::Boolean base.send(:alias_method, :uniqueItems?, :uniqueItems) base.field :maxProperties, Integer base.field :minProperties, Integer base.field :required, Swagger::Boolean base.send(:alias_method, :required?, :required) base.field :enum, Array[Object] base.field :type, Object # Swagger extensions to JSON schema :\ base.field :discriminator, String base.field :readOnly, Swagger::Boolean base.field :xml, Object # TODO: Swagger XML object / XML support base.field :externalDocs, Object # TODO: ExternalDocumentation class base.field :example, Object end |
#format ⇒ Object
JSON-Schema field format.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#maximum ⇒ Object
JSON-Schema field maximum.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#maxItems ⇒ Object
JSON-Schema field maxItems.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#maxLength ⇒ Object
JSON-Schema field maxLength.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#maxProperties ⇒ Object
JSON-Schema field maxProperties.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#minimum ⇒ Object
JSON-Schema field minimum.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#minItems ⇒ Object
JSON-Schema field minItems.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#minLength ⇒ Object
JSON-Schema field minLength.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#minProperties ⇒ Object
JSON-Schema field minProperties.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#multipleOf ⇒ Object
JSON-Schema field multipleOf.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#pattern ⇒ Object
JSON-Schema field pattern.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#readOnly ⇒ Object
Swagger Schema field readOnly.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 93 def self.included(base) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength # Subset of standard JSON schema base.field :$ref, String base.field :format, String base.field :title, String base.field :description, String base.field :default, Object base.field :multipleOf, Numeric base.field :maximum, Numeric base.field :exclusiveMaximum, Swagger::Boolean base.send(:alias_method, :exclusiveMaximum?, :exclusiveMaximum) base.field :minimum, Numeric base.field :exclusiveMinimum, Swagger::Boolean base.send(:alias_method, :exclusiveMinimum?, :exclusiveMinimum) base.field :maxLength, Integer base.field :minLength, Integer base.field :pattern, String base.field :maxItems, Integer base.field :minItems, Integer base.field :uniqueItems, Swagger::Boolean base.send(:alias_method, :uniqueItems?, :uniqueItems) base.field :maxProperties, Integer base.field :minProperties, Integer base.field :required, Swagger::Boolean base.send(:alias_method, :required?, :required) base.field :enum, Array[Object] base.field :type, Object # Swagger extensions to JSON schema :\ base.field :discriminator, String base.field :readOnly, Swagger::Boolean base.field :xml, Object # TODO: Swagger XML object / XML support base.field :externalDocs, Object # TODO: ExternalDocumentation class base.field :example, Object end |
#required ⇒ Object
JSON-Schema field required.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#title ⇒ Object
JSON-Schema field title.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#type ⇒ Object
JSON-Schema field type.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#uniqueItems ⇒ Object
JSON-Schema field uniqueItems.
|
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 9
|
#xml ⇒ Object
Swagger Schema field xml.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/swagger/v2/deterministic_json_schema.rb', line 93 def self.included(base) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength # Subset of standard JSON schema base.field :$ref, String base.field :format, String base.field :title, String base.field :description, String base.field :default, Object base.field :multipleOf, Numeric base.field :maximum, Numeric base.field :exclusiveMaximum, Swagger::Boolean base.send(:alias_method, :exclusiveMaximum?, :exclusiveMaximum) base.field :minimum, Numeric base.field :exclusiveMinimum, Swagger::Boolean base.send(:alias_method, :exclusiveMinimum?, :exclusiveMinimum) base.field :maxLength, Integer base.field :minLength, Integer base.field :pattern, String base.field :maxItems, Integer base.field :minItems, Integer base.field :uniqueItems, Swagger::Boolean base.send(:alias_method, :uniqueItems?, :uniqueItems) base.field :maxProperties, Integer base.field :minProperties, Integer base.field :required, Swagger::Boolean base.send(:alias_method, :required?, :required) base.field :enum, Array[Object] base.field :type, Object # Swagger extensions to JSON schema :\ base.field :discriminator, String base.field :readOnly, Swagger::Boolean base.field :xml, Object # TODO: Swagger XML object / XML support base.field :externalDocs, Object # TODO: ExternalDocumentation class base.field :example, Object end |