For a legacy API that I document in order for a successful authentication I need to provide the following headers:
X-Access-Token: {token}
Accept: application/json; version=public/v2
For the token part I need document it via:
openapi: 3.0.0
info:
version: "v2"
title: Company App Public Api
description: Integrate your platform with company app website
components:
securitySchemes:
ApiKey:
type: 'apiKey'
in: 'header'
name: 'X-Access-Token'
security:
- ApiKey: []
But how I can document that also for an authentication I need to provide an Accept: application/json; version=public/v2
. The Accept
header must contain the application/json; version=public/v2
anything else returns 406 Not Acceptable
header.
Also, the header Accept
with value application/json; version=public/v2
should be in my request. The response header is always application/json
.
Do you know how I can document that?