mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix incorrect media types (#1712)
This commit is contained in:
parent
5b6f128bd0
commit
a4c4ffcf3b
@ -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:
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user