1

I have a header param which should be used for every route. But I don't want to add the annotation for this param in every Controller. I tried different things but it's not possible to add it to an interface or to a class which will be exteneded by every controller. Is there a possibility to make it global? This is the param I want to set:

/**
 * @OA\Parameter(
 *     name="x-locale",
 *     in="header",
 *     description="Locale for siteaccess matching",
 *     )
 */
Zwen2012
  • 3,360
  • 9
  • 40
  • 67

1 Answers1

0

Based on the How to define global parameters in OpenAPI? it is pretty creepy. Something like this:

nelmio_api_doc:
    documentation:
        components:
            securitySchemes:
                # ...
                Locale:
                    type: apiKey
                    in: header
                    name: Accept-language
                    description: "Examples:<br>en<br>en-US"
vodevel
  • 144
  • 4