diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java index f27115bc831..ca3a2f66b6f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java @@ -37,9 +37,9 @@ public class GoModelTest { public void simpleModelTest() { final Schema model = new Schema() .description("a sample model") - .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) - .addProperties("name", new StringSchema()) - .addProperties("createdAt", new DateTimeSchema()) + .addProperty("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperty("name", new StringSchema()) + .addProperty("createdAt", new DateTimeSchema()) .addRequiredItem("id") .addRequiredItem("name"); final DefaultCodegen codegen = new GoClientCodegen(); @@ -85,8 +85,8 @@ public class GoModelTest { public void listPropertyTest() { final Schema model = new Schema() .description("a sample model") - .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) - .addProperties("urls", new ArraySchema() + .addProperty("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperty("urls", new ArraySchema() .items(new StringSchema())) .addRequiredItem("id"); final DefaultCodegen codegen = new GoClientCodegen(); @@ -122,7 +122,7 @@ public class GoModelTest { public void mapPropertyTest() { final Schema model = new Schema() .description("a sample model") - .addProperties("translations", new MapSchema() + .addProperty("translations", new MapSchema() .additionalProperties(new StringSchema())) .addRequiredItem("id"); final DefaultCodegen codegen = new GoClientCodegen(); @@ -150,7 +150,7 @@ public class GoModelTest { public void complexPropertyTest() { final Schema model = new Schema() .description("a sample model") - .addProperties("children", new Schema().$ref("#/definitions/Children")); + .addProperty("children", new Schema().$ref("#/definitions/Children")); final DefaultCodegen codegen = new GoClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); @@ -173,7 +173,7 @@ public class GoModelTest { public void complexListProperty() { final Schema model = new Schema() .description("a sample model") - .addProperties("children", new ArraySchema() + .addProperty("children", new ArraySchema() .items(new Schema().$ref("#/definitions/Children"))); final DefaultCodegen codegen = new GoClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); @@ -199,7 +199,7 @@ public class GoModelTest { public void complexMapProperty() { final Schema model = new Schema() .description("a sample model") - .addProperties("children", new MapSchema() + .addProperty("children", new MapSchema() .additionalProperties(new Schema().$ref("#/definitions/Children"))); final DefaultCodegen codegen = new GoClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);