Bug Report Checklist
Description
Specifications with reserved rust/openapi keywords (e.g.: "type") do not work with the conversion feature.
When compiling the generated library with the features server and conversion errors are thrown during compile time.
For every model containing these names the following error is thrown:
error[E0412]: cannot find type `uc_` in module `frunk_core::labelled::chars`
--> src/models.rs:8:43
|
8 | #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
| ^^^^^^^^^^^^^^^^^^^^^^ not found in `frunk_core::labelled::chars`
|
= note: this error originates in the derive macro `frunk::LabelledGeneric` (in Nightly builds, run with -Z macro-backtrace for more info)
In newer versions of the openAPI generator these types are renamed to r#<oldname> and frunk can't work with # in variable names.
openapi-generator version
latest and latest-release
Last working in versions 5.x.x
OpenAPI declaration file content or url
https://gist.githubusercontent.com/N-Schaef/fe8d962016e2d495e99d49aee09b53bb/raw/e10ddda48422d29b084832f52297e937da180da7/specification.json
Generation Details
Using official docker image
Steps to reproduce
mkdir ~/tmp
cd ~/tmp
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli:latest generate -i https://gist.githubusercontent.com/N-Schaef/fe8d962016e2d495e99d49aee09b53bb/raw/e10ddda48422d29b084832f52297e937da180da7/specification.json -g rust-server -o /local
cargo build -F server -F conversion
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
Specifications with reserved rust/openapi keywords (e.g.: "type") do not work with the
conversionfeature.When compiling the generated library with the features
serverandconversionerrors are thrown during compile time.For every model containing these names the following error is thrown:
In newer versions of the openAPI generator these types are renamed to
r#<oldname>and frunk can't work with#in variable names.openapi-generator version
latestandlatest-releaseLast working in versions
5.x.xOpenAPI declaration file content or url
https://gist.githubusercontent.com/N-Schaef/fe8d962016e2d495e99d49aee09b53bb/raw/e10ddda48422d29b084832f52297e937da180da7/specification.json
Generation Details
Using official docker image
Steps to reproduce
Related issues/PRs
Suggest a fix