Skip to content

Feature/response models #17

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Nicholas-Schaub
Copy link

This PR modifies the describe_full_response_schema function to provide a more comprehensive JSON response schema. Specifically, it traces references until the entire top level response model is fully defined, and mirrors the output of pydantics BaseModel.json_model_schema output for a specific model.

This can become large for complex models, but seems appropriate given the name of the option.

The major reason for this change is that the original code would discard Union fields that get translated to anyOf, which were removed in the clean_schema_for_display function.

This PR is WIP, and needs at least two unit tests: one for Union fields and one for fields defined by a pydantic BaseModel

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