Skip to content

Commit

Permalink
fix: make version schemas internal and final (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmzig authored May 6, 2024
1 parent 9bbb0ce commit ab5894b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Version/Result/ListingResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @internal
*/
readonly class ListingResult
final readonly class ListingResult
{
/**
* @param array $items
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/AssetType/ImageVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
use Pimcore\Bundle\StudioBackendBundle\Version\Schema\AssetVersion;
use Pimcore\Bundle\StudioBackendBundle\Version\Schema\Dimensions;

/**
* @internal
*/
#[Schema(
title: 'ImageVersion',
type: 'object'
)]
readonly class ImageVersion extends AssetVersion
final readonly class ImageVersion extends AssetVersion
{
public function __construct(
string $fileName,
Expand Down
3 changes: 3 additions & 0 deletions src/Version/Schema/AssetVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'AssetVersion',
type: 'object'
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/DataObjectVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'DataObjectVersion',
type: 'object'
)]
readonly class DataObjectVersion
final readonly class DataObjectVersion
{
public function __construct(
#[Property(description: 'modification date', type: 'integer', example: 1712823182)]
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/Dimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'VersionUser',
type: 'object'
)]
readonly class Dimensions
final readonly class Dimensions
{
public function __construct(
#[Property(description: 'width', type: 'integer', example: 1920)]
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/DocumentVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'DocumentVersion',
type: 'object'
)]
readonly class DocumentVersion
final readonly class DocumentVersion
{
public function __construct(
#[Property(description: 'modification date', type: 'integer', example: 1712823182)]
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'VersionUser',
type: 'object'
)]
readonly class User
final readonly class User
{
public function __construct(
#[Property(description: 'ID', type: 'integer', example: 2)]
Expand Down
5 changes: 4 additions & 1 deletion src/Version/Schema/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;

/**
* @internal
*/
#[Schema(
title: 'Version',
type: 'object'
)]
readonly class Version
final readonly class Version
{
public function __construct(
#[Property(description: 'version ID', type: 'integer', example: 2)]
Expand Down

0 comments on commit ab5894b

Please sign in to comment.