Sha256: 14ca46ca13b53c5fe37d42fa362a03355b09f76c7fc62e3621b543daae094079

Contents?: true

Size: 611 Bytes

Versions: 36

Compression:

Stored size: 611 Bytes

Contents

module OpenAPIParser::Schemas
  class Header < Base
    openapi_attr_values :description, :required, :deprecated, :style, :explode, :example

    openapi_attr_value :allow_empty_value, schema_key: :allowEmptyValue
    openapi_attr_value :allow_reserved, schema_key: :allowReserved

    # @!attribute [r] schema
    #   @return [Schema, Reference, nil]
    openapi_attr_object :schema, Schema, reference: true

    # validate by schema
    # @param [Object] value
    def validate(value)
      OpenAPIParser::SchemaValidator.validate(value, schema, OpenAPIParser::SchemaValidator::Options.new)
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
openapi_parser-2.2.2 lib/openapi_parser/schemas/header.rb
openapi_parser-2.2.1 lib/openapi_parser/schemas/header.rb
openapi_parser-2.2.0 lib/openapi_parser/schemas/header.rb
openapi_parser-2.1.0 lib/openapi_parser/schemas/header.rb
openapi_parser-2.0.0 lib/openapi_parser/schemas/header.rb
openapi_parser_firetail-1.0.0 lib/openapi_parser/schemas/header.rb
openapi_parser-1.0.0 lib/openapi_parser/schemas/header.rb
openapi_parser-1.0.0.beta1 lib/openapi_parser/schemas/header.rb
openapi_parser-0.15.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.14.1 lib/openapi_parser/schemas/header.rb
openapi_parser-0.14.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.13.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.12.1 lib/openapi_parser/schemas/header.rb
openapi_parser-0.12.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.11.2 lib/openapi_parser/schemas/header.rb
openapi_parser-0.11.1 lib/openapi_parser/schemas/header.rb
openapi_parser-0.11.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.10.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.9.0 lib/openapi_parser/schemas/header.rb
openapi_parser-0.8.0 lib/openapi_parser/schemas/header.rb