Enums: Added new endpoint for listing enums - #1069
Open
kalisp wants to merge 4 commits into
Open
Conversation
…feature/endpoint_to_list_enums
…feature/endpoint_to_list_enums
martastain
requested changes
Aug 17, 2026
| ) | ||
|
|
||
|
|
||
| @router.get("/enums", response_model=list[EnumResolverInfo], tags=["Enums"]) |
Member
There was a problem hiding this comment.
This should be /enum - as an entrypoint for /enum/{enumName}
| async def list_resolvers(cls) -> list[EnumResolverInfo]: | ||
| result = [] | ||
| for name, resolver in cls.resolvers.items(): | ||
| params = await resolver.get_accepted_params() |
Member
There was a problem hiding this comment.
This is probably the last opportunity to change accepted params to dict[str, AttributeType] or dict[str, str | int | float]. AttributeType is widely recognized in the codebase so it will be consistent - now we have "str" instead "string".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Adds enpoint
enums(GET) to list all available enum resolvers.Technical details
Not completely sold on
enumsroute, open for better names and with form ofsettings_form. (But that could get updated when some resolvers will actually havesettings_form.)