Fix incorrect media types (#1712)

This commit is contained in:
Pavel Stejskal 2020-09-01 16:42:55 +02:00 committed by GitHub
parent 5b6f128bd0
commit a4c4ffcf3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -113,11 +113,11 @@ final class FosRestDescriber implements RouteDescriberInterface
$requestBody->content = OA\UNDEFINED !== $requestBody->content ? $requestBody->content : [];
switch ($type) {
case 'json':
$contentType = 'application\json';
$contentType = 'application/json';
break;
case 'xml':
$contentType = 'application\xml';
$contentType = 'application/xml';
break;
default:

View File

@ -29,7 +29,7 @@ class FOSRestTest extends WebTestCase
$this->assertHasParameter('foo', 'query', $operation);
$this->assertInstanceOf(OA\RequestBody::class, $operation->requestBody);
$bodySchema = $operation->requestBody->content['application\json']->schema;
$bodySchema = $operation->requestBody->content['application/json']->schema;
$this->assertHasProperty('bar', $bodySchema);
$this->assertHasProperty('baz', $bodySchema);