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

Schema type incorrectly set when omitted and additionalProperties given #1766

Open
spacether opened this issue Jul 1, 2022 · 0 comments
Open

Comments

@spacether
Copy link
Contributor

spacether commented Jul 1, 2022

Schema type incorrectly set when omitted and additionalProperties given

Swagger-parser version: 2.0.31

Sample spec:

openapi: 3.0.3
info:
  title: openapi 3.0.3 sample spec
  description: sample spec for testing openapi functionality, built from json schema
    tests for draft6
  version: 0.0.1
paths: {}
components:
  schemas:
    PropertyNamedRefThatIsNotAReference:
      properties:
        $ref:
          type: string
    RefInAdditionalproperties:
      additionalProperties:
        $ref: '#/components/schemas/PropertyNamedRefThatIsNotAReference'

For RefInAdditionalproperties, type should be unset but the parser sets it to object

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

1 participant