forked from loafle/openapi-generator-original
[php-symfony] Symfony6 support (#11810)
* support symfony6
* fix issues with StrictJsonDeserialization
* regenerate samples
* add suggestions
* update samples
* support php 7.4 and symfony 5
* allow versions based on semantic versioning
* regenerate sample
* change method of determining result types
* update samples
* describe usage of bundle in symfony app
* better documentation
* fix duplicate auth methods
* do not set namespace for default types
* fix UploadedFile type
* next try fixing auth
* regenerate samples
* fix: auth method shall not be duplicated
* Revert "fix duplicate auth methods"
This reverts commit 0dc418737b.
* chore: regenerate samples
* fix tests
* regenerate sample
* more fixes for tests
* update tests
* add kernel shutdown
Co-authored-by: Benjamin Haeublein <benjaminh@testing-vm.lan.benjaminh.de>
Co-authored-by: Renaud de Chivré <renaud@tahitiwebdesign.com>
This commit is contained in:
committed by
GitHub
parent
96dd6c5806
commit
77fa028bb3
@@ -16,11 +16,10 @@ Method | HTTP request | Description
|
||||
|
||||
## Service Declaration
|
||||
```yaml
|
||||
# src/Acme/MyBundle/Resources/services.yml
|
||||
# config/services.yml
|
||||
services:
|
||||
# ...
|
||||
acme.my_bundle.api.pet:
|
||||
class: Acme\MyBundle\Api\PetApi
|
||||
Acme\MyBundle\Api\PetApi:
|
||||
tags:
|
||||
- { name: "open_api_server.api", api: "pet" }
|
||||
# ...
|
||||
@@ -58,7 +57,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#addPet
|
||||
*/
|
||||
public function addPet(Pet $pet)
|
||||
public function addPet(Pet $pet, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\Pet
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -120,7 +119,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#deletePet
|
||||
*/
|
||||
public function deletePet($petId, $apiKey = null)
|
||||
public function deletePet($petId, $apiKey = null, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -183,7 +182,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#findPetsByStatus
|
||||
*/
|
||||
public function findPetsByStatus(array $status)
|
||||
public function findPetsByStatus(array $status, &$responseCode, array &$responseHeaders): iterable
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -245,7 +244,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#findPetsByTags
|
||||
*/
|
||||
public function findPetsByTags(array $tags)
|
||||
public function findPetsByTags(array $tags, &$responseCode, array &$responseHeaders): iterable
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -307,7 +306,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#getPetById
|
||||
*/
|
||||
public function getPetById($petId)
|
||||
public function getPetById($petId, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\Pet
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -369,7 +368,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#updatePet
|
||||
*/
|
||||
public function updatePet(Pet $pet)
|
||||
public function updatePet(Pet $pet, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\Pet
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -431,7 +430,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#updatePetWithForm
|
||||
*/
|
||||
public function updatePetWithForm($petId, $name = null, $status = null)
|
||||
public function updatePetWithForm($petId, $name = null, $status = null, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -495,7 +494,7 @@ class PetApi implements PetApiInterface
|
||||
/**
|
||||
* Implementation of PetApiInterface#uploadFile
|
||||
*/
|
||||
public function uploadFile($petId, $additionalMetadata = null, UploadedFile $file = null)
|
||||
public function uploadFile($petId, $additionalMetadata = null, UploadedFile $file = null, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\ApiResponse
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
|
||||
@@ -12,11 +12,10 @@ Method | HTTP request | Description
|
||||
|
||||
## Service Declaration
|
||||
```yaml
|
||||
# src/Acme/MyBundle/Resources/services.yml
|
||||
# config/services.yml
|
||||
services:
|
||||
# ...
|
||||
acme.my_bundle.api.store:
|
||||
class: Acme\MyBundle\Api\StoreApi
|
||||
Acme\MyBundle\Api\StoreApi:
|
||||
tags:
|
||||
- { name: "open_api_server.api", api: "store" }
|
||||
# ...
|
||||
@@ -46,7 +45,7 @@ class StoreApi implements StoreApiInterface
|
||||
/**
|
||||
* Implementation of StoreApiInterface#deleteOrder
|
||||
*/
|
||||
public function deleteOrder($orderId)
|
||||
public function deleteOrder($orderId, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -108,7 +107,7 @@ class StoreApi implements StoreApiInterface
|
||||
/**
|
||||
* Implementation of StoreApiInterface#getInventory
|
||||
*/
|
||||
public function getInventory()
|
||||
public function getInventory(, &$responseCode, array &$responseHeaders): array|\int
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -159,7 +158,7 @@ class StoreApi implements StoreApiInterface
|
||||
/**
|
||||
* Implementation of StoreApiInterface#getOrderById
|
||||
*/
|
||||
public function getOrderById($orderId)
|
||||
public function getOrderById($orderId, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\Order
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -213,7 +212,7 @@ class StoreApi implements StoreApiInterface
|
||||
/**
|
||||
* Implementation of StoreApiInterface#placeOrder
|
||||
*/
|
||||
public function placeOrder(Order $order)
|
||||
public function placeOrder(Order $order, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\Order
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
|
||||
@@ -16,11 +16,10 @@ Method | HTTP request | Description
|
||||
|
||||
## Service Declaration
|
||||
```yaml
|
||||
# src/Acme/MyBundle/Resources/services.yml
|
||||
# config/services.yml
|
||||
services:
|
||||
# ...
|
||||
acme.my_bundle.api.user:
|
||||
class: Acme\MyBundle\Api\UserApi
|
||||
Acme\MyBundle\Api\UserApi:
|
||||
tags:
|
||||
- { name: "open_api_server.api", api: "user" }
|
||||
# ...
|
||||
@@ -58,7 +57,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#createUser
|
||||
*/
|
||||
public function createUser(User $user)
|
||||
public function createUser(User $user, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -120,7 +119,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#createUsersWithArrayInput
|
||||
*/
|
||||
public function createUsersWithArrayInput(array $user)
|
||||
public function createUsersWithArrayInput(array $user, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -182,7 +181,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#createUsersWithListInput
|
||||
*/
|
||||
public function createUsersWithListInput(array $user)
|
||||
public function createUsersWithListInput(array $user, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -244,7 +243,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#deleteUser
|
||||
*/
|
||||
public function deleteUser($username)
|
||||
public function deleteUser($username, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -298,7 +297,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#getUserByName
|
||||
*/
|
||||
public function getUserByName($username)
|
||||
public function getUserByName($username, &$responseCode, array &$responseHeaders): array|\OpenAPI\Server\Model\User
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -352,7 +351,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#loginUser
|
||||
*/
|
||||
public function loginUser($username, $password)
|
||||
public function loginUser($username, $password, &$responseCode, array &$responseHeaders): array|\string
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -415,7 +414,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#logoutUser
|
||||
*/
|
||||
public function logoutUser()
|
||||
public function logoutUser(, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
@@ -474,7 +473,7 @@ class UserApi implements UserApiInterface
|
||||
/**
|
||||
* Implementation of UserApiInterface#updateUser
|
||||
*/
|
||||
public function updateUser($username, User $user)
|
||||
public function updateUser($username, User $user, &$responseCode, array &$responseHeaders): void
|
||||
{
|
||||
// Implement the operation ...
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# InlineObject
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | Updated name of the pet | [optional]
|
||||
**status** | **string** | Updated status of the pet | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# InlineObject1
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**file** | [**UploadedFile**](UploadedFile.md) | file to upload | [optional]
|
||||
|
||||
[[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