Skip to content

chore: upgrade openapi-ts to 0.99.0#38152

Draft
hyoban wants to merge 4 commits into
mainfrom
codex/upgrade-openapi-ts-autofix
Draft

chore: upgrade openapi-ts to 0.99.0#38152
hyoban wants to merge 4 commits into
mainfrom
codex/upgrade-openapi-ts-autofix

Conversation

@hyoban

@hyoban hyoban commented Jun 29, 2026

Copy link
Copy Markdown
Member

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

  • Upgrade @hey-api/openapi-ts back to 0.99.0 and regenerate API contracts with the updated generator.
  • Keep the console contract entry generation fix so 0.99.0 does not emit extra root client, core, client.gen.ts, sdk.gen.ts, or types.gen.ts artifacts.
  • Do not add a local discriminator schema workaround or smoke test; the generated FormInputConfig discriminator change remains visible in the contract diff for upstream evaluation.
  • Make autofix.ci regenerate frontend contracts when contract generator inputs or dependency files change, not only when api/** changes.
  • Linked issue: No linked issue.

Upstream status

This PR should stay as a draft until the upstream discriminator issue is fixed and released by @hey-api/openapi-ts: hey-api/hey-api#4138. The candidate upstream fix is hey-api/hey-api#4139.

Until that lands in a published release, the generated Zod v4 contracts can still expose the const + default discriminator issue instead of applying a local Dify workaround.

Validation:

  • pnpm --dir packages/contracts gen-api-contract-from-openapi
  • pnpm --dir packages/contracts type-check
  • git diff --check

From Codex

Screenshots

N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@github-actions github-actions Bot added the web This relates to changes on the web. label Jun 29, 2026
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.40%. Comparing base (d8f3be4) to head (dde1e5c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #38152      +/-   ##
==========================================
+ Coverage   85.34%   85.40%   +0.05%     
==========================================
  Files        4967     5122     +155     
  Lines      258427   262758    +4331     
  Branches    49034    50092    +1058     
==========================================
+ Hits       220567   224398    +3831     
- Misses      33568    34068     +500     
  Partials     4292     4292              
Flag Coverage Δ
cli 88.45% <ø> (?)
dify-ui 94.93% <ø> (ø)
web 85.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hyoban hyoban changed the title fix: support openapi-ts 0.99.0 test: expose openapi-ts 0.99.0 discriminator issue Jun 29, 2026
@hyoban hyoban changed the title test: expose openapi-ts 0.99.0 discriminator issue chore: upgrade openapi-ts to 0.99.0 Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant