Skip to content

Conversation

@cnaples79
Copy link

Summary

Expose two small convenience constructors in the public API:

  • : equivalent to the empty schema, validates any instance (marshals as ).
  • : equivalent to , validates no instance (marshals as ).

Rationale

When constructing schemas programmatically, it’s common to set fields (e.g. ) to JSON Schema booleans. Today this requires non-obvious patterns like . Public helpers improve readability and avoid duplicating these helpers across downstream codebases.

Changes

  • Add and in .
  • Tests: marshal behavior (/) and basic validate behavior using .

Fixes #13

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.

Proposal/Request: Expose False() and True() constructors

1 participant