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 10 commits into
base: main
Choose a base branch
from
Draft

Prototype/ordering #216

wants to merge 10 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 5 times, most recently from 1e57667 to a8ab054 Compare February 10, 2025 10:45
@lu-pl lu-pl force-pushed the prototype/ordering branch from d26c9a0 to c72b7e5 Compare February 17, 2025 09:52
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