Daniel 2 лет назад
Родитель
Сommit
8806175c79
3 измененных файлов: 36 добавлений и 59 удалений
  1. +1
    -1
      export/openapi.json
  2. +22
    -58
      export/openapi.yaml
  3. +13
    -0
      src/ApiResource/PostingApi.php

+ 1
- 1
export/openapi.json
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 22
- 58
export/openapi.yaml Просмотреть файл

@@ -155,7 +155,7 @@ paths:
-
name: id
in: path
description: 'CommentApi identifier'
description: 'Comment identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -180,7 +180,7 @@ paths:
-
name: id
in: path
description: 'CommentApi identifier'
description: 'Comment identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -223,7 +223,7 @@ paths:
-
name: id
in: path
description: 'CommentApi identifier'
description: 'Comment identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -414,7 +414,7 @@ paths:
-
name: id
in: path
description: 'ContactApi identifier'
description: 'Contact identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -439,7 +439,7 @@ paths:
-
name: id
in: path
description: 'ContactApi identifier'
description: 'Contact identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -482,7 +482,7 @@ paths:
-
name: id
in: path
description: 'ContactApi identifier'
description: 'Contact identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -642,7 +642,7 @@ paths:
-
name: id
in: path
description: 'MediaObject identifier'
description: 'Media identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -667,7 +667,7 @@ paths:
-
name: id
in: path
description: 'MediaObject identifier'
description: 'Media identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -896,7 +896,7 @@ paths:
-
name: id
in: path
description: 'PartnerApi identifier'
description: 'Partner identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -921,7 +921,7 @@ paths:
-
name: id
in: path
description: 'PartnerApi identifier'
description: 'Partner identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -964,7 +964,7 @@ paths:
-
name: id
in: path
description: 'PartnerApi identifier'
description: 'Partner identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1181,7 +1181,7 @@ paths:
-
name: id
in: path
description: 'PostingApi identifier'
description: 'Post identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1206,7 +1206,7 @@ paths:
-
name: id
in: path
description: 'PostingApi identifier'
description: 'Post identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1249,7 +1249,7 @@ paths:
-
name: id
in: path
description: 'PostingApi identifier'
description: 'Post identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1429,7 +1429,7 @@ paths:
-
name: id
in: path
description: 'ProductApi identifier'
description: 'Product identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1454,7 +1454,7 @@ paths:
-
name: id
in: path
description: 'ProductApi identifier'
description: 'Product identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1497,7 +1497,7 @@ paths:
-
name: id
in: path
description: 'ProductApi identifier'
description: 'Product identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1662,7 +1662,7 @@ paths:
-
name: id
in: path
description: 'UserApi identifier'
description: 'User identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1705,7 +1705,7 @@ paths:
-
name: id
in: path
description: 'UserApi identifier'
description: 'User identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1774,7 +1774,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1786,7 +1785,6 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1820,7 +1818,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1832,7 +1829,6 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1880,7 +1876,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1892,7 +1887,6 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1922,7 +1916,6 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1933,7 +1926,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1999,7 +1991,6 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2010,7 +2001,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2090,7 +2080,6 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2101,7 +2090,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2252,7 +2240,6 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2326,7 +2313,6 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2414,7 +2400,6 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2456,7 +2441,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2468,14 +2452,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2485,7 +2467,7 @@ components:
description: 'array<int, CommentApi>'
type: array
items:
type: string
$ref: '#/components/schemas/Comment'
createdAt:
readOnly: true
type:
@@ -2509,14 +2491,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2565,7 +2545,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2577,14 +2556,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2594,7 +2571,7 @@ components:
description: 'array<int, CommentApi>'
type: array
items:
type: string
$ref: '#/components/schemas/Comment.jsonhal'
createdAt:
readOnly: true
type:
@@ -2627,14 +2604,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2681,7 +2656,6 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2693,14 +2667,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2710,7 +2682,7 @@ components:
description: 'array<int, CommentApi>'
type: array
items:
type: string
$ref: '#/components/schemas/Comment.jsonld'
createdAt:
readOnly: true
type:
@@ -2734,14 +2706,12 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2761,7 +2731,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2800,7 +2769,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2853,7 +2821,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2894,7 +2861,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2948,7 +2914,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -3016,7 +2981,6 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'


+ 13
- 0
src/ApiResource/PostingApi.php Просмотреть файл

@@ -20,6 +20,7 @@ use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Constraints\NotBlank;
@@ -83,6 +84,18 @@ class PostingApi
/**
* @var $comments array<int, CommentApi>
*/
#[ApiProperty(
readableLink: true,
writableLink: true,
builtinTypes: [
new Type(
'object',
collection: true,
collectionKeyType: [new Type('int')],
collectionValueType: new Type('object', class: CommentApi::class)
)
]
)]
public array $comments = [];

#[ApiProperty(writable: false)]


Загрузка…
Отмена
Сохранить