Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Generating from a folder of schema files gives invalid results #2634

Open
andrewducker opened this issue Jul 18, 2024 · 0 comments
Open
Labels

Comments

@andrewducker
Copy link

Generating using the following syntax to pick up all of the json schemas in a folder produces a generated file where the results are incorrect.

Issue Type

parsing (I think)

Context (Environment, Version, Language)

Input Format: Schema
Output Language: Verified with C#, Java, and Rust

CLI, 23.0.170

Description

I have two schema files "Person" and "Product" that both reference a third file "Location".

If I generate specifying each of those files separately then I get something sensible (although see also this bug).

If I generate using the folder with them in it as an input then the results make no sense, missing properties, adding in the schema, ID, title, and description.

Input Data

BugReportGenerateFromFolder.zip

See the readme in this zip.

The results were generated with
quicktype --lang rust --src-lang schema --out generatedFromFiles.rs --src .\product.json --src .\person.json --src .\location.json
and
quicktype --lang rust --src-lang schema --out generatedFromFolder.rs --src .\
(I've tried giving the absolute path rather than a relative one - no change)

Expected Behaviour / Output

The results from generating a folder with json schemas in it should be identical to specifying each of those schemas separately.

Steps to Reproduce

Unzip the example files.
Run the two commands.
Do a file compare on the two generated files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant