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

Prototype/ordering #216

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Prototype/ordering #216

wants to merge 8 commits into from

Conversation

lu-pl
Copy link
Contributor

@lu-pl lu-pl commented Feb 6, 2025

Concerns #171.

This draft implements a prototype for field-based result ordering.

QueryParameters now implements a metaclass-ish hook for dynamically assigning an Enum of order-able model fields at model class parametrization time. This leads to improved OpenAPI docs, see my initial metaclass draft. Note that this is done with __class_getitem__ now, which basically wraps metaclass behavior.

Also see the updated examples.

@lu-pl lu-pl force-pushed the prototype/ordering branch 2 times, most recently from 6ab32b2 to dfad447 Compare February 6, 2025 19:05
@lu-pl lu-pl force-pushed the prototype/ordering branch from dfad447 to 5c7bc03 Compare February 6, 2025 20:34
@lu-pl lu-pl force-pushed the prototype/ordering branch from 50f70a5 to bfa4c8b Compare February 7, 2025 09:00
@lu-pl lu-pl force-pushed the prototype/ordering branch from 9b9cc76 to 63ec35f Compare February 10, 2025 06:16
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