Kaynağa Gözat

more lists

master
Daniel 1 yıl önce
ebeveyn
işleme
3cd4362c31
6 değiştirilmiş dosya ile 40 ekleme ve 2 silme
  1. +1
    -1
      export/openapi.json
  2. +30
    -0
      export/openapi.yaml
  3. +2
    -0
      src/ApiResource/ContactPartnerProductApi.php
  4. +2
    -0
      src/ApiResource/PartnerProductApi.php
  5. +4
    -1
      src/ApiResource/UserProductApi.php
  6. +1
    -0
      src/Mapper/DocumentEntityToApiMapper.php

+ 1
- 1
export/openapi.json
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 30
- 0
export/openapi.yaml Dosyayı Görüntüle

@@ -377,6 +377,21 @@ paths:
style: form
explode: false
allowReserved: false
-
name: 'order[partnerProduct.product.name]'
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
enum:
- asc
- desc
style: form
explode: false
allowReserved: false
deprecated: false
post:
operationId: api_contact_partner_products_post
@@ -1823,6 +1838,21 @@ paths:
style: form
explode: true
allowReserved: false
-
name: 'order[product.name]'
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
enum:
- asc
- desc
style: form
explode: false
allowReserved: false
-
name: excludeContactId
in: query


+ 2
- 0
src/ApiResource/ContactPartnerProductApi.php Dosyayı Görüntüle

@@ -7,6 +7,7 @@

namespace App\ApiResource;

use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Doctrine\Orm\State\Options;
use ApiPlatform\Metadata\ApiFilter;
@@ -48,6 +49,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
'contact' => 'exact',
'partnerProduct.product.name' => 'ipartial',
])]
#[ApiFilter(OrderFilter::class, properties: ['partnerProduct.product.name'], arguments: ['orderParameterName' => 'order'])]
class ContactPartnerProductApi
{
#[ApiProperty(readable: false, writable: false, identifier: true)]


+ 2
- 0
src/ApiResource/PartnerProductApi.php Dosyayı Görüntüle

@@ -7,6 +7,7 @@

namespace App\ApiResource;

use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Doctrine\Orm\State\Options;
use ApiPlatform\Metadata\ApiFilter;
@@ -52,6 +53,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
'product.name' => 'ipartial',
'partner.type' => 'exact'
])]
#[ApiFilter(OrderFilter::class, properties: ['product.name'], arguments: ['orderParameterName' => 'order'])]
#[ApiFilter(PartnerProductUnassignedFilter::class)]
class PartnerProductApi
{


+ 4
- 1
src/ApiResource/UserProductApi.php Dosyayı Görüntüle

@@ -45,7 +45,10 @@ use Symfony\Component\Validator\Constraints\NotBlank;
processor: EntityClassDtoStateProcessor::class,
stateOptions: new Options(entityClass: UserProduct::class),
)]
#[ApiFilter(SearchFilter::class, properties: ['user' => 'exact', 'product' => 'exact'])]
#[ApiFilter(SearchFilter::class, properties: [
'user' => 'exact',
'product' => 'exact'
])]
#[ApiFilter(OrderFilter::class, properties: ['product.name'], arguments: ['orderParameterName' => 'order'])]
class UserProductApi implements OwnerInterface
{


+ 1
- 0
src/Mapper/DocumentEntityToApiMapper.php Dosyayı Görüntüle

@@ -46,6 +46,7 @@ class DocumentEntityToApiMapper implements MapperInterface
$dto->name = $entity->getName();
$dto->description = $entity->getDescription();

$dto->partnerIri = null;
if ($entity->getPartner()) {
$dto->partnerIri = $dto->partner = $this->microMapper->map($entity->getPartner(), PartnerApi::class, [
MicroMapperInterface::MAX_DEPTH => 1,


Yükleniyor…
İptal
Kaydet