I am trying to write a Open API Specification(V3) for a API that i am developing and facing issue in defining the accept header. In my spec, defining the accept header as follows:
parameters:
- in: header
name: Accept
required: true
description: Defines the media type and version of the API endpoint
schema:
enum:
- 'application/vnd.iotdeviceenrollment.v1'
- 'application/json'
type: string
But i found out that i have used a restricted value 'Accept' as the name of a header parameter: https://apisecurity.io/encyclopedia/content/oasv3/oasconformance/bestpractices/v3-warning-parameter-header-accept
As a result of this, when i export the Open API Specification to the Azure APIM, the accept header is not visible and being ignored.
If this is the case, what is the correct way to define an accept header in the Open API Specification V3
Note: When tested with Open API SwaggerUI, i could see the accept header value in the UI preview.