Skip to content

Commit

Permalink
Merge fbdb007 into 8711c80
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Jan 4, 2021
2 parents 8711c80 + fbdb007 commit 82a3ade
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/OpenApi/Factory/OpenApiFactory.php
Expand Up @@ -232,7 +232,7 @@ private function collectPaths(ResourceMetadata $resourceMetadata, string $resour
$operationId,
$operation['openapi_context']['tags'] ?? (OperationType::SUBRESOURCE === $operationType ? $operation['shortNames'] : [$resourceShortName]),
$responses,
$operation['openapi_context']['summary'] ?? '',
$operation['openapi_context']['summary'] ?? $this->getPathDescription($resourceShortName, $method, $operationType),
$operation['openapi_context']['description'] ?? $this->getPathDescription($resourceShortName, $method, $operationType),
isset($operation['openapi_context']['externalDocs']) ? new ExternalDocumentation($operation['openapi_context']['externalDocs']['description'] ?? null, $operation['openapi_context']['externalDocs']['url']) : null,
$parameters,
Expand Down
20 changes: 10 additions & 10 deletions tests/OpenApi/Factory/OpenApiFactoryTest.php
Expand Up @@ -256,7 +256,7 @@ public function testInvoke(): void
]))),
])),
],
'',
'Retrieves the collection of Dummy resources.',
'Retrieves the collection of Dummy resources.',
null,
[
Expand Down Expand Up @@ -289,7 +289,7 @@ public function testInvoke(): void
),
'400' => new Model\Response('Invalid input'),
],
'',
'Creates a Dummy resource.',
'Creates a Dummy resource.',
null,
[],
Expand Down Expand Up @@ -320,7 +320,7 @@ public function testInvoke(): void
),
'404' => new Model\Response('Resource not found'),
],
'',
'Retrieves a Dummy resource.',
'Retrieves a Dummy resource.',
null,
[new Model\Parameter('id', 'path', 'Resource identifier', true, false, false, ['type' => 'string'])]
Expand All @@ -341,7 +341,7 @@ public function testInvoke(): void
'400' => new Model\Response('Invalid input'),
'404' => new Model\Response('Resource not found'),
],
'',
'Replaces the Dummy resource.',
'Replaces the Dummy resource.',
null,
[new Model\Parameter('id', 'path', 'Resource identifier', true, false, false, ['type' => 'string'])],
Expand All @@ -361,7 +361,7 @@ public function testInvoke(): void
'204' => new Model\Response('Dummy resource deleted'),
'404' => new Model\Response('Resource not found'),
],
'',
'Removes the Dummy resource.',
'Removes the Dummy resource.',
null,
[new Model\Parameter('id', 'path', 'Resource identifier', true, false, false, ['type' => 'string'])]
Expand All @@ -374,7 +374,7 @@ public function testInvoke(): void
[
'404' => new Model\Response('Resource not found'),
],
'',
'Dummy',
'Custom description',
null,
[new Model\Parameter('id', 'path', 'Resource identifier', true, false, false, ['type' => 'string'])]
Expand All @@ -397,7 +397,7 @@ public function testInvoke(): void
'400' => new Model\Response('Invalid input'),
'404' => new Model\Response('Resource not found'),
],
'',
'Replaces the Dummy resource.',
'Replaces the Dummy resource.',
null,
[new Model\Parameter('id', 'path', 'Resource identifier', true, false, false, ['type' => 'string'])],
Expand All @@ -423,7 +423,7 @@ public function testInvoke(): void
])),
])),
],
'',
'Retrieves the collection of Dummy resources.',
'Retrieves the collection of Dummy resources.',
null,
[
Expand Down Expand Up @@ -467,7 +467,7 @@ public function testInvoke(): void
])),
])),
],
'',
'Retrieves the collection of Dummy resources.',
'Retrieves the collection of Dummy resources.',
null,
[
Expand Down Expand Up @@ -683,7 +683,7 @@ public function testSubresourceDocumentation()
])
),
],
'',
'Retrieves a Question resource.',
'Retrieves a Question resource.',
null,
[new Model\Parameter('id', 'path', 'Question identifier', true, false, false, ['type' => 'string'])]
Expand Down

0 comments on commit 82a3ade

Please sign in to comment.