Skip to content

Commit

Permalink
Merge pull request #187 from igoryok-zp/develop
Browse files Browse the repository at this point in the history
Bumps
  • Loading branch information
igoryok-zp authored Nov 2, 2024
2 parents 38cfb90 + cc184f8 commit ccb0727
Show file tree
Hide file tree
Showing 10 changed files with 672 additions and 779 deletions.
4 changes: 2 additions & 2 deletions app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.0",
"api-platform/core": "^4.0",
"doctrine/annotations": "^2.0",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.14",
"lexik/jwt-authentication-bundle": "^2.16",
"lexik/jwt-authentication-bundle": "^3.1",
"nelmio/cors-bundle": "^2.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.15",
Expand Down
1,056 changes: 456 additions & 600 deletions app/composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ api_platform:
JWT:
name: Authorization
type: header
use_symfony_listeners: true
226 changes: 124 additions & 102 deletions app/src/ApiResource/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use ApiPlatform\Metadata\Link;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use ApiPlatform\OpenApi\Model\Operation;
use ApiPlatform\OpenApi\Model\Parameter;
use ApiPlatform\OpenApi\Model\RequestBody;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
Expand All @@ -35,21 +38,24 @@
ArticleConfig::OUTPUT_LIST,
],
],
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'limit',
'in' => 'query',
'required' => false,
'type' => 'integer',
], [
'name' => 'offset',
'in' => 'query',
'required' => false,
'type' => 'integer',
]],
],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'limit',
in: 'query',
required: false,
schema: ['type' => 'integer']
),
new Parameter(
name: 'offset',
in: 'query',
required: false,
schema: ['type' => 'integer'],
),
],
),
),
new Get(
name: 'article_list',
Expand All @@ -59,36 +65,42 @@
ArticleConfig::OUTPUT_LIST,
],
],
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'author',
'in' => 'query',
'required' => false,
'type' => 'string',
], [
'name' => 'favorited',
'in' => 'query',
'required' => false,
'type' => 'string',
], [
'name' => 'tag',
'in' => 'query',
'required' => false,
'type' => 'string',
], [
'name' => 'limit',
'in' => 'query',
'required' => false,
'type' => 'integer',
], [
'name' => 'offset',
'in' => 'query',
'required' => false,
'type' => 'integer',
]],
],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'author',
in: 'query',
required: false,
schema: ['type' => 'string'],
),
new Parameter(
name: 'favorited',
in: 'query',
required: false,
schema: ['type' => 'string'],
),
new Parameter(
name: 'tag',
in: 'query',
required: false,
schema: ['type' => 'string'],
),
new Parameter(
name: 'limit',
in: 'query',
required: false,
schema: ['type' => 'integer'],
),
new Parameter(
name: 'offset',
in: 'query',
required: false,
schema: ['type' => 'integer'],
),
],
),
),
new Get(
name: 'article_get',
Expand All @@ -105,16 +117,18 @@
ArticleConfig::OUTPUT,
],
],
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'slug',
'in' => 'path',
'required' => true,
'type' => 'string',
]],
],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'slug',
in: 'path',
required: true,
schema: ['type' => 'string'],
),
],
),
),
new Post(
name: 'article_create',
Expand All @@ -135,10 +149,10 @@
ArticleConfig::VALID,
],
],
openapiContext: [
'summary' => '',
'description' => '',
],
openapi: new Operation(
summary: '',
description: '',
),
),
new Put(
name: 'article_update',
Expand All @@ -160,32 +174,36 @@
ArticleConfig::VALID,
],
],
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'slug',
'in' => 'path',
'required' => true,
'type' => 'string',
]],
],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'slug',
in: 'path',
required: true,
schema: ['type' => 'string'],
),
],
),
),
new Delete(
name: 'article_delete',
uriTemplate: '/articles/{slug}',
controller: ArticleDeleteController::class,
read: false,
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'slug',
'in' => 'path',
'required' => true,
'type' => 'string',
]],
],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'slug',
in: 'path',
required: true,
schema: ['type' => 'string'],
),
],
),
),
new Post(
name: 'article_favorite',
Expand All @@ -199,19 +217,21 @@
ArticleConfig::OUTPUT,
],
],
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'slug',
'in' => 'path',
'required' => true,
'type' => 'string',
]],
'requestBody' => [
'content' => [],
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'slug',
in: 'path',
required: true,
schema: ['type' => 'string'],
),
],
],
requestBody: new RequestBody(
content: new \ArrayObject(),
),
),
),
new Delete(
name: 'article_unfavorite',
Expand All @@ -224,16 +244,18 @@
],
],
status: 200,
openapiContext: [
'summary' => '',
'description' => '',
'parameters' => [[
'name' => 'slug',
'in' => 'path',
'required' => true,
'type' => 'string',
]],
'responses' => [
openapi: new Operation(
summary: '',
description: '',
parameters: [
new Parameter(
name: 'slug',
in: 'path',
required: true,
schema: ['type' => 'string'],
),
],
responses: [
'200' => [
'content' => [
'application/json' => [
Expand All @@ -249,7 +271,7 @@
],
],
],
],
),
),
],
)]
Expand Down
Loading

0 comments on commit ccb0727

Please sign in to comment.