I'm trying to setup Open API 2 (fka swagger) using swagger-php but i haven't been able to find an example of a implementation using annotations with Content-Type: application/x-www-form-urlencoded
Only yaml examples, like the following
Taking from that example, if i have the endpoint
POST https://url.co.uk
Host: server.example.com
Authorization: Bearer <Initial Access Token>
Content-Type: application/x-www-form-urlencoded
&grant_type=password
&client_id=<client id>
&client_secret=<client secret>
How can this be expressed on Open Api annotations for a Symfony/PHP project?
@SWG\Post(
consumes={"application/x-www-form-urlencoded"},
produces={"application/xml", "application/json"},
)
Or, if you currently use 3-d version, from https://github.com/zircote/swagger-php/blob/master/Examples/petstore.swagger.io/controllers/PetController.php#L241
@OA\RequestBody(
* required=false,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded"
* )
* ),