Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Expose publicsort
method for JSON schema generation#10595
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
cloudflare-workers-and-pagesbot commentedOct 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deploying pydantic-docs with |
Latest commit: | 12cc428 |
Status: | ✅ Deploy successful! |
Preview URL: | https://756056c8.pydantic-docs.pages.dev |
Branch Preview URL: | https://sorting-for-good-hopefully.pydantic-docs.pages.dev |
codspeed-hqbot commentedOct 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#10595 willnot alter performanceComparing Summary
|
github-actionsbot commentedOct 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Coverage reportClick to see where and how coverage changed
This report was generated bypython-coverage-comment-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
07e2b72
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Closes#7580
At first, thought we might have to add a flag to fix this. The way I feel about adding flags at this point is about howedna (from The Incredibles) feels about capes.
Luckily, was able to sidestep the need for a flag by exposing the sort method as a public one in the
GenerateJsonSchema
class.Did a little bit of refactoring to make things more type checking friendly re the outer sort vs recursive sorts. I did the move -> public and refactoring in different commits, so should be easy to review. Also added a docs example to expose the customizability here. Yay for empowered users!