diff --git a/docs/generators/go.md b/docs/generators/go.md index 72c7fa56ec5..31dae23e98b 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -148,7 +148,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Uuid|✗| |Array|✓|OAS2,OAS3 |Null|✗|OAS3 -|AnyType|✗|OAS2,OAS3 +|AnyType|✓|OAS2,OAS3 |Object|✓|OAS2,OAS3 |Maps|✓|ToolingExtension |CollectionFormat|✓|OAS2 @@ -209,9 +209,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |Composite|✓|OAS2,OAS3 |Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 -|allOf|✗|OAS2,OAS3 -|anyOf|✗|OAS3 -|oneOf|✗|OAS3 +|allOf|✓|OAS2,OAS3 +|anyOf|✓|OAS3 +|oneOf|✓|OAS3 |not|✗|OAS3 ### Security Feature diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index bc86bb8eaeb..d7c5e9820fd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -87,6 +87,12 @@ public class GoClientCodegen extends AbstractGoCodegen { GlobalFeature.LinkObjects, GlobalFeature.ParameterStyling ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.anyOf, + SchemaSupportFeature.oneOf, + SchemaSupportFeature.allOf + + ) .excludeSchemaSupportFeatures( SchemaSupportFeature.Polymorphism ) @@ -97,6 +103,9 @@ public class GoClientCodegen extends AbstractGoCodegen { ClientModificationFeature.BasePath, ClientModificationFeature.UserAgent ) + .includeDataTypeFeatures( + DataTypeFeature.AnyType + ) ); generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.STABLE).build();