hotmeteor / spectator

OpenAPI testing for PHP
MIT License
285 stars 53 forks source link

'additionalProperties' are not supported by Spectator? #143

Closed Marre-86 closed 9 months ago

Marre-86 commented 1 year ago

I've got this in my OpenAPI spec:

    CartResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CartItem'
        message:
          type: string

And the tests using Spectator pass though they must fall because I introduce an error into specs for testing purposes (in CartItem object replace one of its properties type to 'integer' from 'string')

Moreover, even if I replace $ref: value with totally another object the tests pass nevertheless!

ronaldwanink commented 1 year ago

FYI: I use additionalProperties=true/false, and that works fine.