Skip to content

Conversation

@ericszentivanyi
Copy link
Contributor

@ericszentivanyi ericszentivanyi commented Jan 14, 2026

This PR introduces a new condition that requires a root schema to contain a title when its definitions are empty.

Previously, if this condition was not met, Typify would silently generate an empty output containing only boilerplate. This now results in an error, as a title or definitions are the bare minimum required to generate types.

We can assume that any schema meeting this condition is at least a partially valid JSON Schema for Typify’s purposes. The schemars crate does not provide any mechanism for validating schemas, so this can be used as a reasonable heuristic instead.

Fixes #516, fixes #313

@ericszentivanyi ericszentivanyi changed the title fix!: require title when there are no definitions in the schema fix!: require title when there are no definitions in the schema Jan 14, 2026
@ericszentivanyi ericszentivanyi changed the title fix!: require title when there are no definitions in the schema fix!: require title when definitions are empty Jan 14, 2026
@ericszentivanyi ericszentivanyi marked this pull request as ready for review January 14, 2026 15:14
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.

error or warn on non-json schema inputs Empty module generated when no title

1 participant