Skip to content

Commit

Permalink
feat(EntityGenerator): Added ApiProperty documentation for generated …
Browse files Browse the repository at this point in the history
…entities non-virtual fields
  • Loading branch information
roadiz-ci committed Jan 18, 2024
1 parent 5613534 commit 088197c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/DocumentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace RZ\Roadiz\Documents\Models;

use ApiPlatform\Metadata\ApiProperty;
use Symfony\Component\Serializer\Annotation as SymfonySerializer;

trait DocumentTrait
Expand Down Expand Up @@ -277,6 +278,10 @@ protected function initDocumentTrait(): void
#[
SymfonySerializer\Groups(["document", "document_display", "nodes_sources", "tag", "attribute"]),
SymfonySerializer\SerializedName("processable"),
ApiProperty(
description: 'Document can be processed as an image for resampling and other image operations.',
writable: false,
)
]
public function isProcessable(): bool
{
Expand Down

0 comments on commit 088197c

Please sign in to comment.