-
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.
Make
isRoot()
call on annotation safe (#1417)
- Loading branch information
1 parent
29e0378
commit 9983523
Showing
3 changed files
with
59 additions
and
1 deletion.
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
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,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
// intentionally none: namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Annotations as OA; | ||
|
||
/** | ||
* @Annotation | ||
*/ | ||
class ThirdPartyAnnotation | ||
{ | ||
} | ||
|
||
/** | ||
* @OA\Schema | ||
* @ThirdPartyAnnotation | ||
*/ | ||
class SomeParent | ||
{ | ||
} | ||
|
||
/** | ||
* @OA\Schema | ||
*/ | ||
class Child extends SomeParent | ||
{ | ||
} | ||
|
||
/** | ||
* @OA\Info(title="API", version="1.0") | ||
* @OA\Get( | ||
* path="/api/endpoint", | ||
* @OA\Response( | ||
* response=200, | ||
* description="successful operation" | ||
* ) | ||
* ) | ||
*/ | ||
class ThirdPartyAnnotationEndpoint | ||
{ | ||
} |
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,17 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: API | ||
version: '1.0' | ||
paths: | ||
/api/endpoint: | ||
get: | ||
responses: | ||
'200': | ||
description: 'successful operation' | ||
components: | ||
schemas: | ||
SomeParent: { } | ||
Child: | ||
allOf: | ||
- | ||
$ref: '#/components/schemas/SomeParent' |