Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25711.
With two inline object alternatives in a
oneOf, the NestJS server generator writesoverlap-one-of-1.tsbut imports./overlap-one-of1. On master (a8f08266), compiling the generated model index with TypeScript 5.7.3 fails with TS2307.Use the referenced model's recorded
classFilenamefor the import. This preserves the existing output paths and keeps the existing naming fallback for imports outside the generated model set. The regression test generates both inline alternatives, checks that the numbered file exists, and verifies its import.Verification
tsc --noEmitpassed on the generated model index with kebab-case, camelCase, and custom model and file suffixes.PR checklist
Prepared with OpenAI Codex.
Summary by cubic
Fixes NestJS server imports for numbered inline models so generated TypeScript compiles without TS2307.
With two inline object alternatives in a
oneOf, the generator emitsoverlap-one-of-1.tsbut imports./overlap-one-of1, breaking compilation. The import now uses the referenced model's recordedclassFilename, preserving existing output paths and keeping the old naming fallback for models outside the generated set.Verification
masterand passes with the fix.tsc --noEmitpasses on generated model indexes with kebab-case, camelCase, and custom model and file suffixes.Written for commit 2f97eae. Summary will update on new commits.