Skip to content

Commit 804c67f

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

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/client-docs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,21 @@ jobs:
9898
9999
- name: Update and Commit OpenAPI File
100100
if: steps.diff.outputs.diff == 'true'
101+
env:
102+
TARGET_BRANCH: ${{ github.ref_name }}
101103
run: |
104+
set -euo pipefail
102105
cp new-openapi/latest-restapi.json openapi.json
103106
git config user.name "github-actions"
104107
git config user.email "github-actions@phplist-api-client.workflow"
105108
git add openapi.json
109+
if git diff --cached --quiet; then
110+
echo "No changes to commit"
111+
exit 0
112+
fi
106113
git commit -m "Update openapi.json from REST API workflow $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
114+
git fetch origin "$TARGET_BRANCH"
115+
git rebase "origin/$TARGET_BRANCH"
107116
git push origin HEAD:"$TARGET_BRANCH"
108117
109118
- 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)