| @@ -101,6 +101,8 @@ | |||||
| ddev exec bin/console api:openapi:export --yaml >> openapi.yaml | ddev exec bin/console api:openapi:export --yaml >> openapi.yaml | ||||
| -> export OpenApi spec | -> export OpenApi spec | ||||
| (Achtung: Erst die alte OpenApi.yaml löschen!) | |||||
| # Lexik JWT | # Lexik JWT | ||||
| - https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/index.html | - https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/index.html | ||||
| - Nur bei NEU Installation: | - Nur bei NEU Installation: | ||||
| @@ -420,6 +420,47 @@ paths: | |||||
| style: form | style: form | ||||
| explode: false | explode: false | ||||
| allowReserved: false | allowReserved: false | ||||
| - | |||||
| name: 'order[name]' | |||||
| in: query | |||||
| description: '' | |||||
| required: false | |||||
| deprecated: false | |||||
| allowEmptyValue: true | |||||
| schema: | |||||
| type: string | |||||
| enum: | |||||
| - asc | |||||
| - desc | |||||
| style: form | |||||
| explode: false | |||||
| allowReserved: false | |||||
| - | |||||
| name: type | |||||
| in: query | |||||
| description: '' | |||||
| required: false | |||||
| deprecated: false | |||||
| allowEmptyValue: true | |||||
| schema: | |||||
| type: string | |||||
| style: form | |||||
| explode: false | |||||
| allowReserved: false | |||||
| - | |||||
| name: 'type[]' | |||||
| in: query | |||||
| description: '' | |||||
| required: false | |||||
| deprecated: false | |||||
| allowEmptyValue: true | |||||
| schema: | |||||
| type: array | |||||
| items: | |||||
| type: string | |||||
| style: form | |||||
| explode: true | |||||
| allowReserved: false | |||||
| deprecated: false | deprecated: false | ||||
| post: | post: | ||||
| operationId: api_partners_post | operationId: api_partners_post | ||||
| @@ -9,6 +9,7 @@ namespace App\ApiResource; | |||||
| use ApiPlatform\Doctrine\Orm\Filter\OrderFilter; | use ApiPlatform\Doctrine\Orm\Filter\OrderFilter; | ||||
| use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; | |||||
| use ApiPlatform\Doctrine\Orm\State\Options; | use ApiPlatform\Doctrine\Orm\State\Options; | ||||
| use ApiPlatform\Metadata\ApiFilter; | use ApiPlatform\Metadata\ApiFilter; | ||||
| use ApiPlatform\Metadata\ApiProperty; | use ApiPlatform\Metadata\ApiProperty; | ||||
| @@ -50,6 +51,7 @@ use Symfony\Component\Validator\Constraints\NotBlank; | |||||
| stateOptions: new Options(entityClass: Partner::class) | stateOptions: new Options(entityClass: Partner::class) | ||||
| )] | )] | ||||
| #[ApiFilter(OrderFilter::class, properties: ['name'], arguments: ['orderParameterName' => 'order'])] | #[ApiFilter(OrderFilter::class, properties: ['name'], arguments: ['orderParameterName' => 'order'])] | ||||
| #[ApiFilter(SearchFilter::class, properties: ['type' => 'exact'])] | |||||
| class PartnerApi | class PartnerApi | ||||
| { | { | ||||
| #[ApiProperty(readable: false, writable: false, identifier: true)] | #[ApiProperty(readable: false, writable: false, identifier: true)] | ||||