mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 12:10:54 +00:00
use java.io.Serializable (#20815)
This commit is contained in:
parent
ce0c0dcab0
commit
74e49ac1d2
@ -3474,6 +3474,6 @@ public class JavaClientCodegenTest {
|
|||||||
Map<String, File> files = new DefaultGenerator().opts(new ClientOptInput().openAPI(openAPI).config(codegen))
|
Map<String, File> files = new DefaultGenerator().opts(new ClientOptInput().openAPI(openAPI).config(codegen))
|
||||||
.generate().stream().collect(Collectors.toMap(File::getName, Function.identity()));
|
.generate().stream().collect(Collectors.toMap(File::getName, Function.identity()));
|
||||||
|
|
||||||
JavaFileAssert.assertThat(files.get("Type.java")).fileContains("Type implements org.openapitools.java.EnumInterface {");
|
JavaFileAssert.assertThat(files.get("Type.java")).fileContains("Type implements java.io.Serializable {");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5381,6 +5381,6 @@ public class SpringCodegenTest {
|
|||||||
Map<String, File> files = new DefaultGenerator().opts(new ClientOptInput().openAPI(openAPI).config(codegen))
|
Map<String, File> files = new DefaultGenerator().opts(new ClientOptInput().openAPI(openAPI).config(codegen))
|
||||||
.generate().stream().collect(Collectors.toMap(File::getName, Function.identity()));
|
.generate().stream().collect(Collectors.toMap(File::getName, Function.identity()));
|
||||||
|
|
||||||
JavaFileAssert.assertThat(files.get("Type.java")).fileContains("Type implements org.openapitools.java.EnumInterface {");
|
JavaFileAssert.assertThat(files.get("Type.java")).fileContains("Type implements java.io.Serializable {");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ components:
|
|||||||
$ref: '#/components/schemas/Type'
|
$ref: '#/components/schemas/Type'
|
||||||
Type:
|
Type:
|
||||||
type: string
|
type: string
|
||||||
x-implements: org.openapitools.java.EnumInterface
|
x-implements: java.io.Serializable
|
||||||
enum:
|
enum:
|
||||||
- Earth
|
- Earth
|
||||||
- Pegasi
|
- Pegasi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user