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

A separate endpoint for all the choice lists to show values #1552

Closed
szabozoltan69 opened this issue Oct 11, 2022 · 3 comments · Fixed by #1558
Closed

A separate endpoint for all the choice lists to show values #1552

szabozoltan69 opened this issue Oct 11, 2022 · 3 comments · Fixed by #1558
Assignees
Labels

Comments

@szabozoltan69
Copy link
Contributor

szabozoltan69 commented Oct 11, 2022

In the current /docs API documentation system there is no way to display "textual enum values" instead their numeric representation.
Others struggled on it a lot but is not solvable quickly.

Instead of this, we can use help_text for these "choice" fields and create an API endpoint to show them all.

So, the first step is to create the API endpoint with the value-label pairs. It is usable for other purposes also. Maybe something similar to /api/v2/disaster_type , but using multiple choice lists.

@batpad @thenav56 @tovari

@szabozoltan69 szabozoltan69 self-assigned this Oct 11, 2022
@szabozoltan69 szabozoltan69 linked a pull request Oct 19, 2022 that will close this issue
@szabozoltan69 szabozoltan69 reopened this Oct 20, 2022
@szabozoltan69
Copy link
Contributor Author

szabozoltan69 commented Oct 20, 2022

https://dsgocdnapi.azureedge.net/api/v2/erutype is ready for test, but some other endpoints are also needed.
To be decided if we continue this way or somehow else.

@szabozoltan69
Copy link
Contributor Author

Solved via global-enums

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant