Skip to content

Schema#72

Merged
flying-sheep merged 9 commits into
mainfrom
pa/schema
Jan 21, 2026
Merged

Schema#72
flying-sheep merged 9 commits into
mainfrom
pa/schema

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Apr 16, 2025

Copy link
Copy Markdown
Owner

To visualize the schema:

(cargo run -- --schema
	| do { save -f target/schema.json; $in }
	| npx --package=json-schema-to-typescript json2ts --additionalProperties=false
	| save -f target/schema.d.ts)
npx http-server -p 9876 --cors -c-1
xdg-open 'https://json-schema.app/view/%23?url=http%3A%2F%2F127.0.0.1%3A9876%2Ftarget%2Fschema.json'

TODO:

  • figure out if it’s possible to get json-schema-to-typescript to merge the ref with the inline type

  • only use innermost tag: done in schemars 1a19, and of course 1.0

    json-schema-to-typescript creates

     export type StructuralSubElement = Title | Subtitle | Decoration | Docinfo | SubStructure;
     export type SubStructure = {  type: "SubStructure" } & ( | BodyElement);
     export type BodyElement = { type: "BodyElement" } & ();

    which makes no sense

@flying-sheep flying-sheep marked this pull request as ready for review January 21, 2026 11:58
@flying-sheep flying-sheep merged commit 70629f7 into main Jan 21, 2026
2 checks passed
@flying-sheep flying-sheep deleted the pa/schema branch January 21, 2026 17:11
@flying-sheep flying-sheep mentioned this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant