openapi: 3.0.2

info:
  title: Example
  version: 1.0.0

servers:
  - url: http://backend.com/path

x-kong-plugin-request-validator:

paths:
  /global:
    get:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jsonSchema'
  /params/{pathid}/:
    get:
      x-kong-plugin-request-validator:
        enabled: true
        config:
          body_scheme: '{}'
      parameters:
        - in: query
          name: queryid
          schema:
            type: integer
          required: true
        - in: header
          name: User-Id
          schema:
            type: integer
          required: true
        - in: cookie
          name: cookieid
          schema:
            type: integer
          required: true
        - in: path
          name: pathid
          schema:
            type: integer
          required: true
  /body:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jsonSchema'
          application/xml:
            schema:
              $ref: '#/components/schemas/xmlSchema'

components:
  schemas:
    jsonSchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    xmlSchema:
      type: object
      properties:
        prop:
          type: integer
