ソースを参照

wip search

master
Daniel 1年前
コミット
560143fedb
5個のファイルの変更35行の追加1行の削除
  1. +1
    -1
      export/openapi.json
  2. +24
    -0
      export/openapi.yaml
  3. +1
    -0
      src/ApiResource/PartnerFollowApi.php
  4. +1
    -0
      src/ApiResource/PartnerProductApi.php
  5. +8
    -0
      src/Mapper/PartnerProductEntityToApiMapper.php

+ 1
- 1
export/openapi.json
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 24
- 0
export/openapi.yaml ファイルの表示

@@ -1462,6 +1462,18 @@ paths:
style: form
explode: true
allowReserved: false
-
name: partner.name
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
style: form
explode: false
allowReserved: false
-
name: user
in: query
@@ -1723,6 +1735,18 @@ paths:
style: form
explode: true
allowReserved: false
-
name: partner.name
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
style: form
explode: false
allowReserved: false
-
name: product
in: query


+ 1
- 0
src/ApiResource/PartnerFollowApi.php ファイルの表示

@@ -46,6 +46,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
)]
#[ApiFilter(SearchFilter::class, properties: [
'partner' => 'exact',
'partner.name' => 'ipartial',
'user' => 'exact',
'partner.type' => 'exact'
])]


+ 1
- 0
src/ApiResource/PartnerProductApi.php ファイルの表示

@@ -45,6 +45,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
)]
#[ApiFilter(SearchFilter::class, properties: [
'partner' => 'exact',
'partner.name' => 'ipartial',
'product' => 'exact',
'product.name' => 'ipartial',
'partner.type' => 'exact'


+ 8
- 0
src/Mapper/PartnerProductEntityToApiMapper.php ファイルの表示

@@ -41,10 +41,18 @@ class PartnerProductEntityToApiMapper implements MapperInterface
MicroMapperInterface::MAX_DEPTH => 1,
]);

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

$dto->productIri = $dto->product = $this->microMapper->map($entity->getProduct(), ProductApi::class, [
MicroMapperInterface::MAX_DEPTH => 1,
]);

$dto->product = $dto->product = $this->microMapper->map($entity->getProduct(), ProductApi::class, [
MicroMapperInterface::MAX_DEPTH => 1,
]);

$dto->createdAt = $entity->getCreatedAt();

return $dto;


読み込み中…
キャンセル
保存