-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scratch test for multi path endpoints
- Loading branch information
1 parent
e67dfd9
commit f9a3824
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license Apache 2.0 | ||
*/ | ||
|
||
namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Info( | ||
title: 'Multiple Paths For Endpoint Scratch', | ||
version: '1.0' | ||
)] | ||
#[OAT\Get( | ||
path: '/api/class/endpoint', | ||
description: 'A class endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
#[OAT\Get( | ||
path: '/api/class/endpoint2', | ||
description: 'Another class endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
class MultiplePathsForClassEndpoint | ||
{ | ||
} | ||
|
||
class MultiplePathsForMethodEndpoint | ||
{ | ||
#[OAT\Get( | ||
path: '/api/method/endpoint', | ||
description: 'A method endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
#[OAT\Get( | ||
path: '/api/method/endpoint2', | ||
description: 'Another method endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
public function endpoint() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: 'Multiple Paths For Endpoint Scratch' | ||
version: '1.0' | ||
paths: | ||
/api/class/endpoint: | ||
get: | ||
description: 'A class endpoint' | ||
responses: | ||
'200': | ||
description: OK | ||
/api/class/endpoint2: | ||
get: | ||
description: 'Another class endpoint' | ||
responses: | ||
'200': | ||
description: OK | ||
/api/method/endpoint: | ||
get: | ||
description: 'A method endpoint' | ||
operationId: b134e3908c5787b578f7faaa63283168 | ||
responses: | ||
'200': | ||
description: OK | ||
/api/method/endpoint2: | ||
get: | ||
description: 'Another method endpoint' | ||
operationId: ff3758f75b33d1e680c47e92ed39844f | ||
responses: | ||
'200': | ||
description: OK |