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

editoast: better way to infer/compute error context type #6685

Open
sim51 opened this issue Feb 20, 2024 · 1 comment
Open

editoast: better way to infer/compute error context type #6685

sim51 opened this issue Feb 20, 2024 · 1 comment
Labels
area:editoast Work on Editoast Service

Comments

@sim51
Copy link
Contributor

sim51 commented Feb 20, 2024

Description and goal

In the error derive, we compute the type of error's context ( ie list its properties and their type).

For now the code is pretty simple and do manually the cast between simple rust type and openapi.
You can check the function fn error_context_to_openapi_object in src/view/mod.rs for example.

A better way can be found to do it, specially if the error derive if we can save in inventory something that be directly given to utoapi.

Acceptance criteria

A better way to compute context type which support more types with less code

@sim51 sim51 added the area:editoast Work on Editoast Service label Feb 20, 2024
@sim51
Copy link
Contributor Author

sim51 commented Feb 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service
Projects
None yet
Development

No branches or pull requests

1 participant