mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 11:36:12 +00:00
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -14,6 +14,7 @@ DependencyInjection/Compiler/OpenAPIServerApiPass.php
|
||||
DependencyInjection/OpenAPIServerExtension.php
|
||||
Model/ApiResponse.php
|
||||
Model/Category.php
|
||||
Model/EnumStringModel.php
|
||||
Model/Order.php
|
||||
Model/Pet.php
|
||||
Model/Tag.php
|
||||
@@ -39,6 +40,7 @@ docs/Api/StoreApiInterface.md
|
||||
docs/Api/UserApiInterface.md
|
||||
docs/Model/ApiResponse.md
|
||||
docs/Model/Category.md
|
||||
docs/Model/EnumStringModel.md
|
||||
docs/Model/Order.md
|
||||
docs/Model/Pet.md
|
||||
docs/Model/Tag.md
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class ApiResponse
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class Category
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* EnumStringModel
|
||||
*
|
||||
* PHP version 8.1.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use JMS\Serializer\Annotation\Type;
|
||||
use JMS\Serializer\Annotation\SerializedName;
|
||||
|
||||
/**
|
||||
* Class representing the EnumStringModel model.
|
||||
*
|
||||
* enum model
|
||||
*
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
class EnumStringModel
|
||||
{
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const AVAILABLE = "available";
|
||||
const PENDING = "pending";
|
||||
const SOLD = "sold";
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::AVAILABLE,
|
||||
self::PENDING,
|
||||
self::SOLD,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class Order
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class Pet
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class Tag
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ use JMS\Serializer\Annotation\SerializedName;
|
||||
* @package OpenAPI\Server\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
|
||||
class User
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -143,6 +143,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [ApiResponse](docs/Model/ApiResponse.md)
|
||||
- [Category](docs/Model/Category.md)
|
||||
- [EnumStringModel](docs/Model/EnumStringModel.md)
|
||||
- [Order](docs/Model/Order.md)
|
||||
- [Pet](docs/Model/Pet.md)
|
||||
- [Tag](docs/Model/Tag.md)
|
||||
@@ -152,12 +153,6 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
@@ -167,6 +162,12 @@ Class | Method | HTTP request | Description
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* EnumStringModelTest
|
||||
*
|
||||
* PHP version 8.1.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* EnumStringModelTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description enum model
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
* @coversDefaultClass \OpenAPI\Server\Model\EnumStringModel
|
||||
*/
|
||||
class EnumStringModelTest extends TestCase
|
||||
{
|
||||
protected EnumStringModel|MockObject $object;
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(EnumStringModel::class)->getMockForAbstractClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @group integration
|
||||
* @small
|
||||
*/
|
||||
public function testTestClassExists(): void
|
||||
{
|
||||
$this->assertTrue(class_exists(EnumStringModel::class));
|
||||
$this->assertInstanceOf(EnumStringModel::class, $this->object);
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
|
||||
### Example Implementation
|
||||
```php
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# EnumStringModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user