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

improve introspection of types #38

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Conversation

jamesrswift
Copy link
Member

@jamesrswift jamesrswift commented Jun 30, 2024

This PR adds a description field on base-type, which serves to take the descriptive burden off name so that it can more properly be used to identify types for the purposes of rendering them.

For schema generators already in the code base where such specializations do not warrant a distinct name (string derivatives and number derivatives), the new description field is used instead.

For schema generators for more complicated types (array, either, dictionary) name is constant and description takes the burden of describing child schema.

The codebase has been reviewed for any opportunities to include information in the schema itself rather than guess what type it is (i.e., make schemas more characteristic). I think I managed to get them all, but in reviewing, I do think the choice type might be better reworked into a type more properly than through assertions.

To do:

  • Update changelog to reflect any breaking changes

@jamesrswift jamesrswift linked an issue Jun 30, 2024 that may be closed by this pull request
@tingerrr tingerrr changed the title 36 improve introspection of types improve introspection of types Jun 30, 2024
@jamesrswift jamesrswift merged commit 8639473 into main Jul 12, 2024
1 check passed
@tingerrr tingerrr deleted the 36-improve-introspection-of-types branch July 14, 2024 12:15
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.

Improve introspection of types
1 participant