-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zod): pass resolved specKey in context (#1789)
* tests(import-from-subdirectory): another file import Add a new file to `import-from-subdirectory/subdirectory`, reference this file in `petstore.yaml`. Codegen for this schema works for at least React Query, but for zod it throws an error: ``` 🛑 importFromSubdirectory - Oops... 🍻. Ref not found: another-file.yaml#/components/schemas/AnotherSchema ``` * fix(zod): pass resolved specKey in context
- Loading branch information
Showing
7 changed files
with
78 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
10 changes: 10 additions & 0 deletions
10
tests/specifications/import-from-subdirectory/subdirectory/another-file.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
components: | ||
schemas: | ||
AnotherSchema: | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ components: | |
id: | ||
type: integer | ||
format: int64 | ||
file: | ||
$ref: 'another-file.yaml#/components/schemas/AnotherSchema' |
This file contains 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