Sha256: 2e8bd4ed4b9ced1691776082057086a3fe2e3b49ad8536127465397f67b0bf45

Contents?: true

Size: 696 Bytes

Versions: 36

Compression:

Stored size: 696 Bytes

Contents

# TODO: support examples

module OpenAPIParser::Schemas
  class Parameter < Base
    openapi_attr_values :name, :in, :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

    # @return [Object] coerced or original params
    # @param [OpenAPIParser::SchemaValidator::Options] options
    def validate_params(params, options)
      ::OpenAPIParser::SchemaValidator.validate(params, schema, options)
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

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