-
Notifications
You must be signed in to change notification settings - Fork 1
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
Generate OAS3 as code #174
Conversation
f3f96a2
to
4682c3b
Compare
) -> Result<(StatusCode, Json<Value>), ExecutionError> { | ||
post_ratings_analysis_adaptor(bna_pipeline) | ||
#[utoipa::path( | ||
post, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this have a request body for the POST request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It totally should! I completely missed it 😱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ✅
noticed that many of the endpoints have: |
going over the response errors. Can you make them their own schema? For example,
Then,
something like that? |
I think the generator considers them as custom objects and therefore inlines them. This is because I had to created custom examples for each one with the specific error codes and messages. |
Done ✅ |
Leverages `utoipa` to generate the OAS3. Changes: - Splits `/ratings` and `/pipelines`. - Moves schemas to schema.rs. - Adds OAS 3.1 from Axum. - Adds OAS 3.0, down-converted from the OAS 3.1. - Regenerates the bnaclient. - Updates the Justfile. - Makes enums not optional. - Uses APIErrors struct for errors. - Adds ApiError examples for each support HTTP status (400, 401, 403, 404). - Adds ErrorResponses enum to group all errors. - Updates Hurl tests. Signed-off-by: Rémy Greinhofer <[email protected]>
Leverages
utoipa
to generate the OAS3.Changes:
/ratings
and/pipelines
.Signed-off-by: Rémy Greinhofer [email protected]