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

Bug when validating schema with "multipleOf" field #44

Closed
slinkydeveloper opened this issue May 29, 2017 · 1 comment
Closed

Bug when validating schema with "multipleOf" field #44

slinkydeveloper opened this issue May 29, 2017 · 1 comment

Comments

@slinkydeveloper
Copy link
Contributor

Bug in NumericUtils.NumericType

Description

When you try to load a path parameter (I think in general a scheme) with "multipleOf" field, it fails in a ExceptionInInitializerError inside NumericUtils.zero()

Steps to reproduce

Try to load and validate a spec with a path like this:

/pets/{petId}:
    get:
      summary: Info for a specific pet
      operationId: showPetById
      tags:
        - pets
      parameters:
        - name: petId
          in: path
          required: true
          description: The id of the pet to retrieve
          schema:
            type: integer
            multipleOf: 1.0
slinkydeveloper added a commit to slinkydeveloper/KaiZen-OpenApi-Parser that referenced this issue May 29, 2017
@andylowry
Copy link
Contributor

@slinkydeveloper Sorry for delay - I finally (literally yesterday) got to a point in my other work that had to take precedence over this. I hope to be more responsive going forward.

Thanks for the fix. I'm surprised this bug didn't show up earlier - NumericUtils methods are all unusable because of it. The fix looks good. Will merge it now.

andylowry added a commit that referenced this issue Jun 22, 2017
slinkydeveloper added a commit to slinkydeveloper/KaiZen-OpenApi-Parser that referenced this issue Jul 20, 2017
(cherry picked from commit e4ab7a6)
slinkydeveloper added a commit to slinkydeveloper/KaiZen-OpenApi-Parser that referenced this issue Jul 20, 2017
(cherry picked from commit e4ab7a6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants