OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.44k stars 6.48k forks source link

[rust-axum] Support for response status code ranges #18895

Closed emmanuelmathot closed 3 months ago

emmanuelmathot commented 3 months ago

This PR adds support for response ranges in rust-axum server, as defined in section 4.8.16.2 of the spec.

PR checklist

wing328 commented 3 months ago

thanks for the PR

cc @linxGnu

linxGnu commented 3 months ago

Basically LGTM. However, because it touches the template, could you please run Integration Test @emmanuelmathot

If the integration tests do not contains response range, please add update/add new api endpoint. Please refer to this PR as an example: https://github.com/OpenAPITools/openapi-generator/pull/18362

linxGnu commented 3 months ago

@emmanuelmathot please note that axum uses different test cases.

./bin/generate-samples.sh ./bin/configs/manual/*.yaml
 mvn integration-test -f samples/server/petstore/rust-axum/pom.xml

As you can see, samples are generated under ./bin/configs/manual instead

wing328 commented 3 months ago

merged https://github.com/OpenAPITools/openapi-generator/pull/18938 (follow up PR) to update samples with cargo fmt