Skip to content

Commit df18946

Browse files
committed
Remove html_formated from campaign request
1 parent a238db4 commit df18946

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/client-docs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,18 @@ jobs:
9999
- name: Update and Commit OpenAPI File
100100
if: steps.diff.outputs.diff == 'true'
101101
run: |
102+
set -euo pipefail
102103
cp new-openapi/latest-restapi.json openapi.json
103104
git config user.name "github-actions"
104105
git config user.email "github-actions@phplist-api-client.workflow"
105106
git add openapi.json
107+
if git diff --cached --quiet; then
108+
echo "No changes to commit"
109+
exit 0
110+
fi
106111
git commit -m "Update openapi.json from REST API workflow $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
112+
git fetch origin "$TARGET_BRANCH"
113+
git rebase "origin/$TARGET_BRANCH"
107114
git push origin HEAD:"$TARGET_BRANCH"
108115
109116
- name: Skip Commit if No Changes

src/Messaging/Controller/CampaignActionController.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ public function __construct(
8080
response: 403,
8181
description: 'Failure',
8282
content: new OA\JsonContent(ref: '#/components/schemas/UnauthorizedResponse')
83-
)
83+
),
84+
new OA\Response(
85+
response: 404,
86+
description: 'Failure',
87+
content: new OA\JsonContent(ref: '#/components/schemas/NotFoundErrorResponse')
88+
),
8489
]
8590
)]
8691
public function copyMessage(
@@ -265,7 +270,12 @@ public function sendMessage(
265270
response: 403,
266271
description: 'Failure',
267272
content: new OA\JsonContent(ref: '#/components/schemas/UnauthorizedResponse')
268-
)
273+
),
274+
new OA\Response(
275+
response: 404,
276+
description: 'Failure',
277+
content: new OA\JsonContent(ref: '#/components/schemas/NotFoundErrorResponse')
278+
),
269279
]
270280
)]
271281
public function resendMessageToLists(

src/Messaging/Request/Message/MessageFormatRequest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
#[OA\Schema(
1212
schema: 'MessageFormatRequest',
13-
required: ['html_formated', 'send_format'],
13+
required: ['send_format'],
1414
properties: [
15-
new OA\Property(property: 'html_formated', type: 'boolean', example: true),
1615
new OA\Property(
1716
property: 'send_format',
1817
type: 'string',
@@ -24,16 +23,12 @@ enum: ['html', 'text', 'invite'],
2423
)]
2524
class MessageFormatRequest implements RequestDtoInterface
2625
{
27-
#[Assert\Type('bool')]
28-
public bool $htmlFormated;
29-
3026
#[Assert\Choice(['html', 'text', 'invite'])]
3127
public string $sendFormat;
3228

3329
public function getDto(): MessageFormatDto
3430
{
3531
return new MessageFormatDto(
36-
htmlFormated: $this->htmlFormated,
3732
sendFormat: $this->sendFormat,
3833
);
3934
}

0 commit comments

Comments
 (0)