thephpleague / openapi-psr7-validator

It validates PSR-7 messages (HTTP request/response) against OpenAPI specifications
MIT License
526 stars 94 forks source link

Ensure additionalProperty uses correct schema #190

Open fiasco opened 1 year ago

fiasco commented 1 year ago

I opened PR #187 to address this. Reposting here:

I encountered this issue when attempting to validate data against this schema:

EnvironmentFlags:
      type: object
      description: An array of various flags that indicate functionality associated with the environment.
      additionalProperties:
        type: object
        properties:
          cde:
            type: boolean
            description: Determines if the environment is on-demand.

The Properties::validate() method currently attempts to validate additionalProperties by their parent definition which results in an error which validating valid data.