Skip to content

Add form-param regression tests for ChannelAccessToken and ManageAudience#823

Merged
mokuzon merged 1 commit into
masterfrom
users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params
Jun 26, 2026
Merged

Add form-param regression tests for ChannelAccessToken and ManageAudience#823
mokuzon merged 1 commit into
masterfrom
users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params

Conversation

@mokuzon

@mokuzon mokuzon commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Changes

Add form-param regression tests:

  • test/clients/channel-access-token/Api/ChannelAccessTokenApiTest.php
    • issueChannelToken
    • issueChannelTokenByJWT
    • revokeChannelToken
    • revokeChannelTokenByJWT
    • verifyChannelToken
  • test/clients/manage-audience/Api/ManageAudienceBlobApiTest.php (new)
    • createAudienceForUploadingUserIds / addUserIdsToAudience
Original description (obsolete: superseded by the upstream fix in openapi-generator 7.23.0)

resolve #810

Summary

  • openapi-generator 7.21.0 changed the PHP api.mustache template to use {{paramName}} (camelCase) as form data keys in FormDataProcessor::prepare(), instead of {{baseName}} (snake_case)
  • This causes incorrect request bodies (e.g. grantType=client_credentials instead of grant_type=client_credentials), breaking all form-based endpoints
  • Add a custom api.mustache override with a single-line fix: '{{baseName}}' instead of '{{paramName}}'

Test plan

  • Ran python generate-code.py with 7.21.0 locally and check diff of auto generated codes
  • All 23 tests pass (674 assertions), including the previously failing issueStatelessChannelToken tests

@mokuzon mokuzon marked this pull request as draft April 21, 2026 06:28
@renovate renovate Bot force-pushed the renovate/openapi-generator-version branch from 6d2ab46 to 610fd0b Compare April 27, 2026 05:23
@renovate renovate Bot force-pushed the renovate/openapi-generator-version branch from 610fd0b to f9ebe70 Compare May 5, 2026 11:34
Base automatically changed from renovate/openapi-generator-version to master May 5, 2026 11:38
@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch 2 times, most recently from cec5fc7 to eb1e4bf Compare May 19, 2026 05:36
@mokuzon mokuzon changed the title NO-ISSUE: Fix form param keys for openapi-generator 7.21.0 NO-ISSUE: Fix form param keys for openapi-generator May 19, 2026
@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch 5 times, most recently from ea77e56 to 541b70a Compare May 19, 2026 06:08
@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch 2 times, most recently from 6dd83ae to da7f595 Compare June 3, 2026 04:50
@Yang-33

Yang-33 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

issues about form param keys are resolved by openapi generator 7.23.0 OpenAPITools/openapi-generator#23347

@Yang-33

Yang-33 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

how about just adding tests in this PR?

@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch from da7f595 to 653deb6 Compare June 26, 2026 05:38
@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch from 653deb6 to 3d12c83 Compare June 26, 2026 06:14
@mokuzon mokuzon changed the title NO-ISSUE: Fix form param keys for openapi-generator NO-ISSUE: Add form-param regression tests for ChannelAccessToken and ManageAudience Jun 26, 2026
…anageAudience

Cover snake_case form/query keys for the remaining ChannelAccessTokenApi
endpoints (issueChannelToken, issueChannelTokenByJWT, revokeChannelToken,
revokeChannelTokenByJWT, verifyChannelToken), including their async
variants, and add multipart upload form-key tests for ManageAudienceBlobApi,
locking in the form param key behavior fixed upstream in
openapi-generator 7.23.0.

Adopt the Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration trait across
the API test classes so that the '->once()' send expectations are actually
verified, keeping the test suite consistent.
@mokuzon mokuzon force-pushed the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch from 3d12c83 to 6d90538 Compare June 26, 2026 07:10
@mokuzon

mokuzon commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

how about just adding tests in this PR?

Thank you. I've made this a PR containing only the tests.

@mokuzon mokuzon marked this pull request as ready for review June 26, 2026 07:29
@mokuzon mokuzon requested a review from a team June 26, 2026 07:30
@Yang-33 Yang-33 changed the title NO-ISSUE: Add form-param regression tests for ChannelAccessToken and ManageAudience Add form-param regression tests for ChannelAccessToken and ManageAudience Jun 26, 2026
@mokuzon mokuzon added this pull request to the merge queue Jun 26, 2026
Merged via the queue into master with commit 6bf373c Jun 26, 2026
11 checks passed
@mokuzon mokuzon deleted the users/mokuson/NO-ISSUE/fix-openapi-7.21-form-params branch June 26, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants