Skip to content

Commit 6251aa1

Browse files
authored
[RUST-AXUM] fix generator not handling application/x-www-form-urlencoded request content (#18061)
* fix #18060 * isolate the option as separate flag * apply modification suggested by @wing328 * remove added newlines
1 parent 678db1e commit 6251aa1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import org.openapitools.codegen.config.GlobalSettings;
5353
import org.openapitools.codegen.examples.ExampleGenerator;
5454
import org.openapitools.codegen.languages.PhpNextgenClientCodegen;
55+
import org.openapitools.codegen.languages.RustAxumServerCodegen;
5556
import org.openapitools.codegen.languages.RustServerCodegen;
5657
import org.openapitools.codegen.meta.FeatureSet;
5758
import org.openapitools.codegen.meta.GeneratorMetadata;
@@ -4729,7 +4730,7 @@ public CodegenOperation fromOperation(String path,
47294730
if (contentType != null) {
47304731
contentType = contentType.toLowerCase(Locale.ROOT);
47314732
}
4732-
if (contentType != null &&
4733+
if (!(this instanceof RustAxumServerCodegen) && contentType != null &&
47334734
(contentType.startsWith("application/x-www-form-urlencoded") ||
47344735
contentType.startsWith("multipart"))) {
47354736
// process form parameters

0 commit comments

Comments
 (0)