Skip to content

fix(swift): disable use of group separator#23062

Open
97mik wants to merge 2 commits intoOpenAPITools:masterfrom
97mik:swift-decimal-encode-bug
Open

fix(swift): disable use of group separator#23062
97mik wants to merge 2 commits intoOpenAPITools:masterfrom
97mik:swift-decimal-encode-bug

Conversation

@97mik
Copy link

@97mik 97mik commented Feb 26, 2026

Disabling the use of group separator because Decimal was encoded with a comma.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Disable grouping separators when encoding Decimal in Swift 5/6 generators to prevent commas in numbers. Ensures JSON uses plain numeric strings like 1234.56 instead of 1,234.56; samples updated to match.

  • Bug Fixes
    • Set NumberFormatter.usesGroupingSeparator = false in Swift 5 and Swift 6 Extensions.mustache.
    • Regenerated Swift 5/6 petstore samples to adopt the change.

Written for commit 2ef6935. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@wing328
Copy link
Member

wing328 commented Feb 26, 2026

please follow step 3 to update the samples so that CI can verify the change

@4brunu 4brunu closed this Mar 3, 2026
@4brunu 4brunu reopened this Mar 3, 2026
@4brunu
Copy link
Contributor

4brunu commented Mar 3, 2026

Closed and reopened the PR to try to restart CI

@4brunu
Copy link
Contributor

4brunu commented Mar 3, 2026

CI is failing, but it doesn't seem to be related to this PR.

(Reading database ... 218749 files and directories currently installed.)
Preparing to unpack .../curl_8.5.0-2ubuntu10.7_amd64.deb ...
Unpacking curl (8.5.0-2ubuntu10.7) over (8.5.0-2ubuntu10.6) ...
Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu10.7_amd64.deb ...
Unpacking libcurl4t64:amd64 (8.5.0-2ubuntu10.7) over (8.5.0-2ubuntu10.6) ...
Preparing to unpack .../libcurl3t64-gnutls_8.5.0-2ubuntu10.7_amd64.deb ...
Unpacking libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.7) over (8.5.0-2ubuntu10.6) ...
Selecting previously unselected package libcurl4-openssl-dev:amd64.
Preparing to unpack .../libcurl4-openssl-dev_8.5.0-2ubuntu10.7_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (8.5.0-2ubuntu10.7) ...
Setting up libcurl4t64:amd64 (8.5.0-2ubuntu10.7) ...
Setting up libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.7) ...
Setting up libcurl4-openssl-dev:amd64 (8.5.0-2ubuntu10.7) ...
Setting up curl (8.5.0-2ubuntu10.7) ...
Processing triggers for man-db (2.12.0-4build2) ...
Not building database; man-db/auto-update is not 'true'.
Processing triggers for libc-bin (2.39-0ubuntu8.7) ...

Running kernel seems to be up-to-date.

Restarting services...
 systemctl restart packagekit.service php8.3-fpm.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
Downloading Swiftly
/usr/bin/gpg --verify /home/runner/work/_temp/d197ac69-43e2-48c0-a0bc-fb073b806f9b /home/runner/work/_temp/15918ef7-dd7e-435d-a1c4-2286d03ee287
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: Signature made Fri Oct 17 15:00:17 2025 UTC
gpg:                using RSA key E813C892820A6FA13755B268F167DF1ACF9CE069
gpg: Can't check signature: No public key
Error: Unexpected error, unable to continue. Please report at https://github.com/swift-actions/setup-swift/issues
The process '/usr/bin/gpg' failed with exit code 2
Stacktrace:
Error: The process '/usr/bin/gpg' failed with exit code 2
    at ExecState._setResult (/home/runner/work/_actions/swift-actions/setup-swift/v3/dist/index.js:2357:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/swift-actions/setup-swift/v3/dist/index.js:2340:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/swift-actions/setup-swift/v3/dist/index.js:2234:27)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)

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.

3 participants