Skip to content

Enums: Added new endpoint for listing enums - #1069

Open
kalisp wants to merge 4 commits into
developfrom
feature/endpoint_to_list_enums
Open

Enums: Added new endpoint for listing enums#1069
kalisp wants to merge 4 commits into
developfrom
feature/endpoint_to_list_enums

Conversation

@kalisp

@kalisp kalisp commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description of changes

Adds enpoint enums (GET) to list all available enum resolvers.

Technical details

Not completely sold on enums route, open for better names and with form of settings_form. (But that could get updated when some resolvers will actually have settings_form.)

@kalisp
kalisp requested review from Innders and martastain August 13, 2026 13:36
@kalisp kalisp self-assigned this Aug 13, 2026
@kalisp kalisp added the type: feature Adding something new and exciting to the product label Aug 13, 2026
@kalisp kalisp linked an issue Aug 13, 2026 that may be closed by this pull request
@Innders
Innders requested review from filipvnencak and removed request for Innders August 13, 2026 20:57
Comment thread api/enums/__init__.py
)


@router.get("/enums", response_model=list[EnumResolverInfo], tags=["Enums"])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Adding something new and exciting to the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create endpoint to list available enum resolvers

2 participants