osprey icon indicating copy to clipboard operation
osprey copied to clipboard

Issue with adding a property called `type` to an object

Open twoplustwoone opened this issue 5 years ago • 1 comments

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

twoplustwoone avatar Mar 15 '19 15:03 twoplustwoone

This should be fixed in v1.0.0

jstoiko avatar Jul 28 '20 18:07 jstoiko