Class: OpenAPIParser::Schemas::Schema

Inherits:
Base
  • Object
show all
Defined in:
lib/openapi_parser/schemas/schema.rb,
lib/openapi_parser/schemas/classes.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#object_reference, #parent, #raw_schema, #root

Method Summary

Methods inherited from Base

#after_init, #initialize, #inspect

Methods included from Expandable

#expand_reference

Methods included from Findable

#find_object, #purge_object_cache

Methods included from Parser

#_openapi_all_child_objects, #_update_child_object, included, #load_data

Constructor Details

This class inherits a constructor from OpenAPIParser::Schemas::Base

Instance Attribute Details

#additional_propertiesBoolean, ... (readonly)

Returns:



110
# File 'lib/openapi_parser/schemas/schema.rb', line 110

openapi_attr_object :additional_properties, Schema, reference: true, allow_data_type: true, schema_key: :additionalProperties

#all_ofArray<Schema, Reference>? (readonly)

Returns:



86
# File 'lib/openapi_parser/schemas/schema.rb', line 86

openapi_attr_list_object :all_of, Schema, reference: true, schema_key: :allOf

#any_ofArray<Schema, Reference>? (readonly)

Returns:



94
# File 'lib/openapi_parser/schemas/schema.rb', line 94

openapi_attr_list_object :any_of, Schema, reference: true, schema_key: :anyOf

#defaultObject? (readonly)

Returns:



# File 'lib/openapi_parser/schemas/schema.rb', line 55

#deprecatedBoolean? (readonly)

Returns:

  • (Boolean, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 38

#descriptionString? (readonly)

Returns:

  • (String, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 7

#discriminatorDiscriminator? (readonly)

Returns:



106
# File 'lib/openapi_parser/schemas/schema.rb', line 106

openapi_attr_object :discriminator, Discriminator

#enumArray? (readonly)

Returns any type array.

Returns:

  • (Array, nil)

    any type array



# File 'lib/openapi_parser/schemas/schema.rb', line 52

#exampleObject? (readonly)

Returns:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/openapi_parser/schemas/schema.rb', line 61

openapi_attr_values :title, :multipleOf,
:maximum, :exclusiveMaximum, :minimum, :exclusiveMinimum,
:maxLength, :minLength,
:pattern,
:maxItems, :minItems, :uniqueItems,
:maxProperties, :minProperties,
:required, :enum,
:description,
:format,
:default,
:type,
:nullable,
:example,
:deprecated

#exclusiveMaximumBoolean? (readonly)

Returns:

  • (Boolean, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 38

#exclusiveMinimumBoolean? (readonly)

Returns:

  • (Boolean, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 38

#formatString? (readonly)

Returns:

  • (String, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 7

#itemsSchema? (readonly)

Returns:



98
# File 'lib/openapi_parser/schemas/schema.rb', line 98

openapi_attr_object :items, Schema, reference: true

#maximumFloat? (readonly)

Returns:

  • (Float, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 20

#maxItemsInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#maxLengthInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#maxPropertiesInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#minItemsInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#minLengthInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#minPropertiesInteger? (readonly)

Returns:

  • (Integer, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 25

#multipleOfFloat? (readonly)

Returns:

  • (Float, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 20

#nullableBoolean? (readonly)

Returns:

  • (Boolean, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 38

#one_ofArray<Schema, Reference>? (readonly)

Returns:



90
# File 'lib/openapi_parser/schemas/schema.rb', line 90

openapi_attr_list_object :one_of, Schema, reference: true, schema_key: :oneOf

#patternString? (readonly)

Returns regexp.

Returns:

  • (String, nil)

    regexp



# File 'lib/openapi_parser/schemas/schema.rb', line 7

#propertiesHash{String => Schema}? (readonly)

Returns:



102
# File 'lib/openapi_parser/schemas/schema.rb', line 102

openapi_attr_hash_object :properties, Schema, reference: true

#read_onlyBoolean? (readonly)

Returns:

  • (Boolean, nil)


78
# File 'lib/openapi_parser/schemas/schema.rb', line 78

openapi_attr_value :read_only, schema_key: :readOnly

#requiredArray<String>? (readonly)

Returns at least one item included.

Returns:

  • (Array<String>, nil)

    at least one item included



# File 'lib/openapi_parser/schemas/schema.rb', line 49

#titleString? (readonly)

Returns:

  • (String, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 7

#typeString? (readonly)

Returns multiple types doesn’t supported in OpenAPI3.

Returns:

  • (String, nil)

    multiple types doesn’t supported in OpenAPI3



# File 'lib/openapi_parser/schemas/schema.rb', line 7

#uniqueItemsBoolean? (readonly)

Returns:

  • (Boolean, nil)


# File 'lib/openapi_parser/schemas/schema.rb', line 38

#write_onlyBoolean? (readonly)

Returns:

  • (Boolean, nil)


82
# File 'lib/openapi_parser/schemas/schema.rb', line 82

openapi_attr_value :write_only, schema_key: :writeOnly