-
Notifications
You must be signed in to change notification settings - Fork 940
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 around property inheritance (#1353)
- Loading branch information
1 parent
020a6f4
commit 7bd76a0
Showing
7 changed files
with
90 additions
and
17 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,15 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license Apache 2.0 | ||
*/ | ||
|
||
namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Annotations as OA; | ||
|
||
abstract class AbstractBaseClass | ||
{ | ||
/** @OA\Property(property="basefilter") */ | ||
public string $filters; | ||
} |
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
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,33 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license Apache 2.0 | ||
*/ | ||
|
||
namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Annotations as OA; | ||
|
||
/** | ||
* @OA\Schema | ||
*/ | ||
class PropertyInheritance extends AbstractBaseClass | ||
{ | ||
/** @OA\Property(property="inheritedfilter") */ | ||
public string $filters; | ||
} | ||
|
||
/** | ||
* @OA\Info(title="API", version="1.0") | ||
* @OA\Get( | ||
* path="/api/endpoint", | ||
* @OA\Response( | ||
* response=200, | ||
* description="successful operation", | ||
* @OA\JsonContent(ref="#/components/schemas/PropertyInheritance") | ||
* ) | ||
* ) | ||
*/ | ||
class PropertyInheritanceEndpoint | ||
{ | ||
} |
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,21 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: API | ||
version: '1.0' | ||
paths: | ||
/api/endpoint: | ||
get: | ||
responses: | ||
'200': | ||
description: 'successful operation' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/PropertyInheritance' | ||
components: | ||
schemas: | ||
PropertyInheritance: | ||
properties: | ||
inheritedfilter: | ||
type: string | ||
type: object |
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