Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum and maximum properties are not validated #49

Closed
jonpoveda opened this issue Jun 28, 2018 · 1 comment
Closed

Minimum and maximum properties are not validated #49

jonpoveda opened this issue Jun 28, 2018 · 1 comment
Labels
area/schema Indicates an issue on schema area good first issue Indicates an issue ready for a new contributor. kind/bug/confirmed

Comments

@jonpoveda
Copy link

Version: 0.5.0

Expected result: setting a number below 'minimum' or above 'maximum' properties on an should add an error in the attribute RequestValidationResult.errors when RequestValidator.validate is called.

Actual result: Specifying the parameters 'minimum' or 'maximum' makes no difference when validating, returning a None when RequestValidationResult.errors is checked.

@p1c2u p1c2u added kind/bug/confirmed good first issue Indicates an issue ready for a new contributor. labels Jul 9, 2018
@pbasista
Copy link
Contributor

The relevant part of the code:
https://github.com/p1c2u/openapi-core/blob/master/openapi_core/schema/schemas/factories.py#L16

The OpenAPI schema properties, which are currently not supported:

  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum
  • maxLength
  • minLength
  • pattern
  • maxItems
  • minItems
  • uniqueItems
  • maxProperties
  • minProperties

Their definition can be obtained from:
https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5

@p1c2u p1c2u added the area/schema Indicates an issue on schema area label Aug 17, 2018
correl added a commit to correl/openapi-core that referenced this issue Sep 9, 2018
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
correl added a commit to correl/openapi-core that referenced this issue Sep 9, 2018
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
correl added a commit to correl/openapi-core that referenced this issue Sep 9, 2018
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
correl added a commit to correl/openapi-core that referenced this issue Sep 9, 2018
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
correl added a commit to correl/openapi-core that referenced this issue Sep 9, 2018
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
@p1c2u p1c2u closed this as completed in #96 Sep 9, 2018
bjmc pushed a commit to bjmc/openapi-core that referenced this issue Jun 12, 2019
Add support for the following validation properties:
- multipleOf
- maximum
- exclusiveMaximum
- minimum
- exclusiveMinimum
- maxLength
- minLength
- pattern
- maxItems
- minItems
- uniqueItems
- maxProperties
- minProperties

Fixes python-openapi#49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Indicates an issue on schema area good first issue Indicates an issue ready for a new contributor. kind/bug/confirmed
Projects
None yet
Development

No branches or pull requests

3 participants