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

MultipleOf with negative values - parser should throw error. #1398

Closed
SCSreekanth opened this issue Jul 8, 2020 · 0 comments
Closed

MultipleOf with negative values - parser should throw error. #1398

SCSreekanth opened this issue Jul 8, 2020 · 0 comments
Assignees

Comments

@SCSreekanth
Copy link

SCSreekanth commented Jul 8, 2020

Please take a look at the below openapi content.

openapi: 3.0.1
info:
  title: Swagger Petstore
  description: 'This is a sample server Petstore server'
  version: 1.0.0
servers:
  - url: http://mytestServer/{v1}
    variables:
      v2:
        default: 'd'
paths:
  '/pet/{petId}':
    get:
      summary: Find pet by ID
      description: Returns a single pet
      parameters:
        - name: petId
          in: path
          description: ID of pet to return
          required: true
          schema:
            type : integer
            multipleOf: -10
      responses:
        '200':
          description: successful operation

The multipleOf attribute has a negative value. Swagger Editor throws this error but the parser doesn't. Can this be fixed? Thanks

Regards,
Sree

gracekarina added a commit that referenced this issue Aug 5, 2020
gracekarina added a commit that referenced this issue Aug 5, 2020
fix for MultipleOf with negative value issue #1398
@gracekarina gracekarina self-assigned this Aug 5, 2020
kerrykimbrough pushed a commit to kerrykimbrough/swagger-parser that referenced this issue Nov 5, 2020
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