1

I am using OpenAPI 3.0 to describe the schema of the APIs which are running. I have to require two parameters in different locations. What I want to achieve:

parameters:
  - oneOf:
    - in: cookie
      name: username
      description: User's name
      schema:
        type: string
      required: true
    - in: query
      name: nickname
      description: User's nickname
      schema:
        type: string
      required: true

I have read

But those solutions only solve the problems when the parameters are in the same location, so they did not solve my problem.

IvanaGyro
  • 598
  • 7
  • 25
  • 1
    This is a great question but I'm not sure it is possible. This seems like application logic more than something you can require in an API description – Lorna Mitchell Jan 08 '20 at 11:10

0 Answers0