Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Issue with adding a property called type to an object #182

Open
twoplustwoone opened this issue Mar 15, 2019 · 1 comment
Open

Issue with adding a property called type to an object #182

twoplustwoone opened this issue Mar 15, 2019 · 1 comment
Labels

Comments

@twoplustwoone
Copy link

When defining the body for a post method, if I define the body to be an object with a property called type, the behavior is flaky and incorrect.

For example:

/postMethod:
  post:
    body:
      type: object
      properties:
        name: string
        age: number
        type: string

Will create a validation where the body of /postMethod is expected to be a string rather than an object. This is because the parser interprets the type property to be referring to the type of the object, rather than a property of the object

@jstoiko jstoiko added the bug label Jul 28, 2020
@jstoiko
Copy link
Contributor

jstoiko commented Jul 28, 2020

This should be fixed in v1.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants