Skip to content

Commit dad0bb5

Browse files
authored
Fixed DateTime parameters serialization (#116)
1 parent 0d49411 commit dad0bb5

File tree

126 files changed

+1807
-526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1807
-526
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Automation - PR Description Validate"
2+
3+
on:
4+
pull_request:
5+
types: ["opened", "edited", "reopened", "ready_for_review"]
6+
7+
jobs:
8+
automation:
9+
uses: aeon-php/actions/.github/workflows/automation-pr-description-validate.yml@main
10+
secrets:
11+
automation_github_token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Automation - Changelog Release"
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
automation:
10+
uses: aeon-php/actions/.github/workflows/automation-changelog-release.yml@main
11+
secrets:
12+
automation_github_token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Automation - Changelog Update"
2+
3+
on:
4+
push:
5+
branches:
6+
- "2.x"
7+
8+
jobs:
9+
automation:
10+
uses: aeon-php/actions/.github/workflows/automation-changelog-update.yml@main
11+
secrets:
12+
automation_github_token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Automation - Release Description Update"
2+
3+
on:
4+
release:
5+
types:
6+
- "created"
7+
8+
jobs:
9+
automation:
10+
uses: aeon-php/actions/.github/workflows/automation-release-description-update.yml@main
11+
secrets:
12+
automation_github_token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/changelog-release.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/changelog-update.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/pull-request-description-check.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release-description-update.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

rector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
__DIR__ . '/src/AmazonPHP/SellingPartner/AccessToken.php',
4040
]);
4141

42+
$services->set(\AmazonPHP\Rector\ClassMethod\FixArgumentDefaultValuesNotMatchingTypeRector::class);
43+
$services->set(\Rector\CodeQuality\Rector\ClassMethod\DateTimeToDateTimeInterfaceRector::class);
44+
4245
// Define what rule sets will be applied
4346
$containerConfigurator->import(SetList::DEAD_CODE);
4447
$containerConfigurator->import(SetList::PHP_73);

resources/php-amazon-selling-partner-api/api.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ final {{#operations}}class {{packageName}}SDK
285285
}
286286
{{/isExplode}}
287287
{{^isExplode}}
288+
if (${{paramName}} instanceof \DateTimeInterface) {
289+
${{paramName}} = ObjectSerializer::toString(${{paramName}});
290+
}
288291
if (is_array(${{paramName}})) {
289292
${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{#style}}{{style}}{{/style}}{{^style}}{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}{{/style}}', true);
290293
}

0 commit comments

Comments
 (0)