Skip to content

False errors when allOf is in request schema #144

Description

@renom

https://github.com/wallarm/api-firewall/blob/main/internal/platform/validator/unknown_parameters_request.go#L90-L129

It seems findUnknownParamsInJSONBody doesn't handle allOf properly.

requestBody:
  required: true
  content:
    application/json:
      schema:
        allOf:
          - $ref: "#/components/schemas/Schema1"
          - $ref: "#/components/schemas/Schema2"

Returns body parameter not defined in the OpenAPI specification for parameters that's actually defined in one of the schemas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions