Bladeren bron

fix posts

master
Daniel 2 jaren geleden
bovenliggende
commit
8806175c79
3 gewijzigde bestanden met toevoegingen van 36 en 59 verwijderingen
  1. +1
    -1
      export/openapi.json
  2. +22
    -58
      export/openapi.yaml
  3. +13
    -0
      src/ApiResource/PostingApi.php

+ 1
- 1
export/openapi.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 22
- 58
export/openapi.yaml Bestand weergeven

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


+ 13
- 0
src/ApiResource/PostingApi.php Bestand weergeven

@@ -20,6 +20,7 @@ use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Patch; use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post; use ApiPlatform\Metadata\Post;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Attribute\Groups; use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
@@ -83,6 +84,18 @@ class PostingApi
/** /**
* @var $comments array<int, CommentApi> * @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 = []; public array $comments = [];


#[ApiProperty(writable: false)] #[ApiProperty(writable: false)]


Laden…
Annuleren
Opslaan