Skip to content

Add typescript-fetch sample to test temporal (dateLibrary option) - #24941

Draft
wing328 wants to merge 3 commits into
masterfrom
24924-followup
Draft

wing328 wants to merge 3 commits into
masterfrom
24924-followup

Conversation

@wing328

@wing328 wing328 commented Sep 14, 2026

Copy link
Copy Markdown
Member

PR checklist

  • Read the contribution guidelines.
  • 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.
  • 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

Adds a typescript-fetch sample build configured with dateLibrary: temporal so the Temporal date support has checked-in sample coverage.

  • Uses the date-handling.yaml spec, which covers date and date-time values in paths, query parameters, form parameters, models, and a oneOf.
  • Adds the generated client under samples/client/petstore/typescript-fetch/builds/date-library-temporal with npm packaging enabled; no generator behavior changes.

Written for commit e457ef4. Summary will update on new commits.

Review in cubic

@wing328 wing328 changed the title Add typescript-fetch sample to test temporal Add typescript-fetch sample to test temporal (dateLibrary option) Sep 14, 2026
@wing328 wing328 added this to the 7.26.0 milestone Sep 14, 2026
"compilerOptions": {
"declaration": true,
"target": "es6",
"module": "commonjs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@wing328: I managed to get somewhere when I put "lib": ["ES2022", "DOM", "ESNext.Temporal"], here. When I then ran npm exec --package=typescript@6.0.3 --yes -- tsc --noEmit, it finished successfully. However, note the TypeScript version. I have no idea if this can be achieved with TypeScript 5 (which is what is used in ts-typecheck-all.sh). Honestly, I'm guessing that no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants