Kaynağa Gözat

comment count

master
Daniel 1 yıl önce
ebeveyn
işleme
df3404fe63
4 değiştirilmiş dosya ile 16 ekleme ve 1 silme
  1. +1
    -1
      export/openapi.json
  2. +12
    -0
      export/openapi.yaml
  3. +1
    -0
      src/ApiResource/PostingApi.php
  4. +2
    -0
      src/Mapper/PostingEntityToApiMapper.php

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


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

@@ -5450,6 +5450,10 @@ components:
- 'null'
format: iri-reference
example: 'https://example.com/'
numComments:
type:
- integer
- 'null'
createdAt:
readOnly: true
type:
@@ -5581,6 +5585,10 @@ components:
- 'null'
format: iri-reference
example: 'https://example.com/'
numComments:
type:
- integer
- 'null'
createdAt:
readOnly: true
type:
@@ -5719,6 +5727,10 @@ components:
- 'null'
format: iri-reference
example: 'https://example.com/'
numComments:
type:
- integer
- 'null'
createdAt:
readOnly: true
type:


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

@@ -173,6 +173,7 @@ class PostingApi implements OwnerInterface
#[Groups(['posting:create'])]
public ?SaleApi $saleIri = null;

public ?int $numComments = null;

#[ApiProperty(writable: false)]
public ?\DateTimeImmutable $createdAt = null;


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

@@ -68,6 +68,8 @@ class PostingEntityToApiMapper implements MapperInterface
]);
}

$dto->numComments = count($entity->getComments());

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

return $dto;


Yükleniyor…
İptal
Kaydet