diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index df595d68f08f..39363ee65686 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -135,6 +135,9 @@ public class DefaultCodegen implements CodegenConfig { // acts strictly upon a spec, potentially modifying it to have consistent behavior across generators. protected boolean strictSpecBehavior = true; + // map of exceptions for camelized names + protected Map camelizeExeptions = new HashMap(); + // make openapi available to all methods protected OpenAPI openAPI; @@ -1790,9 +1793,9 @@ public String toSetter(String name) { */ public String toApiName(String name) { if (name.length() == 0) { - return "DefaultApi"; + return camelize("default_api", camelizeExeptions); } - return camelize(name + "_" + apiNameSuffix); + return camelize(name + "_" + apiNameSuffix, camelizeExeptions); } /** @@ -1803,7 +1806,7 @@ public String toApiName(String name) { * @return capitalized model name */ public String toModelName(final String name) { - return camelize(modelNamePrefix + "_" + name + "_" + modelNameSuffix); + return camelize(modelNamePrefix + "_" + name + "_" + modelNameSuffix, camelizeExeptions); } /** @@ -2151,7 +2154,7 @@ public String getterAndSetterCapitalize(String name) { if (name == null || name.length() == 0) { return name; } - return camelize(toVarName(name)); + return camelize(toVarName(name), camelizeExeptions); } /** @@ -2182,7 +2185,7 @@ public CodegenProperty fromProperty(String name, Schema p) { } else { property.openApiType = p.getType(); } - property.nameInCamelCase = camelize(property.name, false); + property.nameInCamelCase = camelize(property.name, false, camelizeExeptions); property.nameInSnakeCase = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, property.nameInCamelCase); property.description = escapeText(p.getDescription()); property.unescapedDescription = p.getDescription(); @@ -3658,7 +3661,7 @@ protected String getOrGenerateOperationId(Operation operation, String path, Stri if (builder.toString().length() == 0) { part = Character.toLowerCase(part.charAt(0)) + part.substring(1); } else { - part = camelize(part); + part = camelize(part, camelizeExeptions); } builder.append(part); } @@ -3769,7 +3772,7 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera } co.operationId = uniqueName; co.operationIdLowerCase = uniqueName.toLowerCase(Locale.ROOT); - co.operationIdCamelCase = camelize(uniqueName); + co.operationIdCamelCase = camelize(uniqueName, camelizeExeptions); co.operationIdSnakeCase = underscore(uniqueName); opList.add(co); co.baseName = tag; @@ -4326,7 +4329,7 @@ private String sanitizeValue(String value, String replaceMatch, String replaceVa * @return Sanitized tag */ public String sanitizeTag(String tag) { - tag = camelize(sanitizeName(tag)); + tag = camelize(sanitizeName(tag), camelizeExeptions); // tag starts with numbers if (tag.matches("^\\d.*")) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 6950cfa4e050..c2fc796e0044 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -121,6 +121,46 @@ public AbstractGoCodegen() { "float32", "float64") ); + camelizeExeptions.clear(); + camelizeExeptions.put("Acl", "ACL"); + camelizeExeptions.put("Api", "API"); + camelizeExeptions.put("Ascii", "ASCII"); + camelizeExeptions.put("Cpu", "CPU"); + camelizeExeptions.put("Css", "CSS"); + camelizeExeptions.put("Dns", "DNS"); + camelizeExeptions.put("Eof", "EOF"); + camelizeExeptions.put("Guid", "GUID"); + camelizeExeptions.put("Html", "HTML"); + camelizeExeptions.put("Http", "HTTP"); + camelizeExeptions.put("Https", "HTTPS"); + camelizeExeptions.put("Id", "ID"); + camelizeExeptions.put("Ip", "IP"); + camelizeExeptions.put("Json", "JSON"); + camelizeExeptions.put("Lhs", "LHS"); + camelizeExeptions.put("Qps", "QPS"); + camelizeExeptions.put("Ram", "RAM"); + camelizeExeptions.put("Rhs", "RHS"); + camelizeExeptions.put("Rpc", "RPS"); + camelizeExeptions.put("Sla", "SLA"); + camelizeExeptions.put("Smtp", "SMTP"); + camelizeExeptions.put("Sql", "SQL"); + camelizeExeptions.put("Ssh", "SSH"); + camelizeExeptions.put("Tcp", "TCP"); + camelizeExeptions.put("Tls", "TLS"); + camelizeExeptions.put("Ttl", "TTL"); + camelizeExeptions.put("Udp", "UDP"); + camelizeExeptions.put("Ui", "UI"); + camelizeExeptions.put("Uid", "UID"); + camelizeExeptions.put("Uuid", "UUID"); + camelizeExeptions.put("Uri", "URI"); + camelizeExeptions.put("Url", "URL"); + camelizeExeptions.put("Utf8", "UTF8"); + camelizeExeptions.put("Vm", "VM"); + camelizeExeptions.put("Xml", "XML"); + camelizeExeptions.put("Xmpp", "XMPP"); + camelizeExeptions.put("Xsrf", "XSRF"); + camelizeExeptions.put("Xss", "XSS"); + importMapping = new HashMap(); cliOptions.clear(); @@ -178,8 +218,8 @@ public String toVarName(String name) { return name; // camelize (lower first character) the variable name - // pet_id => PetId - name = camelize(name); + // pet_id => PetID + name = camelize(name, camelizeExeptions); // for reserved word append _ if (isReservedWord(name)) { @@ -204,7 +244,7 @@ public String toParamName(String name) { // params should be lowerCamelCase. E.g. "person Person", instead of // "Person Person". // - name = camelize(toVarName(name), true); + name = camelize(toVarName(name), true, camelizeExeptions); // REVISIT: Actually, for idiomatic go, the param name should // really should just be a letter, e.g. "p Person"), but we'll get @@ -221,7 +261,7 @@ public String toParamName(String name) { public String toModelName(String name) { // camelize the model name // phone_number => PhoneNumber - return camelize(toModel(name)); + return camelize(toModel(name), camelizeExeptions); } @Override @@ -338,17 +378,17 @@ public String toOperationId(String operationId) { // method name cannot use reserved keyword, e.g. return if (isReservedWord(sanitizedOperationId)) { LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " - + camelize("call_" + sanitizedOperationId)); + + camelize("call_" + sanitizedOperationId, camelizeExeptions)); sanitizedOperationId = "call_" + sanitizedOperationId; } // operationId starts with a number if (sanitizedOperationId.matches("^\\d.*")) { - LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize("call_" + sanitizedOperationId)); + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize("call_" + sanitizedOperationId, camelizeExeptions)); sanitizedOperationId = "call_" + sanitizedOperationId; } - return camelize(sanitizedOperationId); + return camelize(sanitizedOperationId, camelizeExeptions); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/StringUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/StringUtils.java index c3035fabc21c..2528f229b5bd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/StringUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/StringUtils.java @@ -1,5 +1,6 @@ package org.openapitools.codegen.utils; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -63,6 +64,29 @@ public static String camelize(String word) { * @return camelized string */ public static String camelize(String word, boolean lowercaseFirstLetter) { + return camelize(word, lowercaseFirstLetter, new HashMap()); + } + + /** + * Camelize name (parameter, property, method, etc) + * + * @param word string to be camelize + * @param camelizeExceptions map of exceptions + * @return camelized string + */ + public static String camelize(String word, Map camelizeExceptions) { + return camelize(word, false, camelizeExceptions); + } + + /** + * Camelize name (parameter, property, method, etc) + * + * @param word string to be camelize + * @param lowercaseFirstLetter lower case for first letter if set to true + * @param camelizeExceptions map of exceptions + * @return camelized string + */ + public static String camelize(String word, boolean lowercaseFirstLetter, Map camelizeExceptions) { // Replace all slashes with dots (package separator) Pattern p = Pattern.compile("\\/(.?)"); Matcher m = p.matcher(word); @@ -132,6 +156,11 @@ public static String camelize(String word, boolean lowercaseFirstLetter) { // remove all underscore word = word.replaceAll("_", ""); + // exceptions + for (String key : camelizeExceptions.keySet()) { + word = word.replaceAll(key, camelizeExceptions.get(key)); + } + return word; } diff --git a/modules/openapi-generator/src/main/resources/go-experimental/response.mustache b/modules/openapi-generator/src/main/resources/go-experimental/response.mustache index 1a8765bae8f1..79f22761bc0b 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/response.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/response.mustache @@ -5,8 +5,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -23,16 +23,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new APIResonse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/modules/openapi-generator/src/main/resources/go/configuration.mustache b/modules/openapi-generator/src/main/resources/go/configuration.mustache index b21d2a13a230..66ed719c73de 100644 --- a/modules/openapi-generator/src/main/resources/go/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go/configuration.mustache @@ -66,7 +66,7 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - Url string + URL string Description string Variables map[string]ServerVariable } @@ -95,7 +95,7 @@ func NewConfiguration() *Configuration { Servers: []ServerConfiguration{ {{/-first}} { - Url: "{{{url}}}", + URL: "{{{url}}}", Description: "{{{description}}}{{^description}}No description provided{{/description}}", {{#variables}} {{#-first}} @@ -132,13 +132,13 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } -// ServerUrl returns URL based on server settings -func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) { +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { if index < 0 || len(c.Servers) <= index { return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) } server := c.Servers[index] - url := server.Url + url := server.URL // go through variables and replace placeholders for name, variable := range server.Variables { diff --git a/modules/openapi-generator/src/main/resources/go/response.mustache b/modules/openapi-generator/src/main/resources/go/response.mustache index 1a8765bae8f1..d23c7e256a58 100644 --- a/modules/openapi-generator/src/main/resources/go/response.mustache +++ b/modules/openapi-generator/src/main/resources/go/response.mustache @@ -5,8 +5,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -23,16 +23,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new DefaultAPIResponse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } 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 27e433f6791f..84e941783be7 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 @@ -56,7 +56,7 @@ public void simpleModelTest() { final CodegenProperty property1 = cm.vars.get(0); Assert.assertEquals(property1.baseName, "id"); Assert.assertEquals(property1.dataType, "int64"); - Assert.assertEquals(property1.name, "Id"); + Assert.assertEquals(property1.name, "ID"); Assert.assertNull(property1.defaultValue); Assert.assertEquals(property1.baseType, "int64"); Assert.assertTrue(property1.hasMore); @@ -105,7 +105,7 @@ public void listPropertyTest() { final CodegenProperty property1 = cm.vars.get(0); Assert.assertEquals(property1.baseName, "id"); Assert.assertEquals(property1.dataType, "int64"); - Assert.assertEquals(property1.name, "Id"); + Assert.assertEquals(property1.name, "ID"); Assert.assertNull(property1.defaultValue); Assert.assertEquals(property1.baseType, "int64"); Assert.assertTrue(property1.hasMore); @@ -115,7 +115,7 @@ public void listPropertyTest() { final CodegenProperty property2 = cm.vars.get(1); Assert.assertEquals(property2.baseName, "urls"); Assert.assertEquals(property2.dataType, "[]string"); - Assert.assertEquals(property2.name, "Urls"); + Assert.assertEquals(property2.name, "URLs"); Assert.assertEquals(property2.baseType, "array"); Assert.assertFalse(property2.hasMore); Assert.assertEquals(property2.containerType, "array"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/StringUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/StringUtilsTest.java index 5073471c0802..c38dc49c35ac 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/StringUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/StringUtilsTest.java @@ -5,6 +5,9 @@ import static org.openapitools.codegen.utils.StringUtils.*; +import java.util.HashMap; +import java.util.Map; + public class StringUtilsTest { // we'll assume that underscore (Twitter elephant bird) works fine @Test @@ -28,6 +31,18 @@ public void testCamelize() throws Exception { Assert.assertEquals(camelize("123", true), "123"); Assert.assertEquals(camelize("$123", true), "$123"); + + Map exc = new HashMap(); + exc.put("Id", "ID"); + exc.put("Api", "API"); + exc.put("Xml", "XML"); + exc.put("Http", "HTTP"); + Assert.assertEquals(camelize("name_id", exc), "NameID"); + Assert.assertEquals(camelize("some-api", exc), "SomeAPI"); + Assert.assertEquals(camelize("id-name", exc), "IDName"); + Assert.assertEquals(camelize("id-name", true, exc), "idName"); + Assert.assertEquals(camelize("xml-http-request", exc), "XMLHTTPRequest"); + Assert.assertEquals(camelize("xml-http-request", true, exc), "xmlHTTPRequest"); } @Test diff --git a/samples/client/petstore/go-experimental/auth_test.go b/samples/client/petstore/go-experimental/auth_test.go index b788cc1199e3..2359f1f76489 100644 --- a/samples/client/petstore/go-experimental/auth_test.go +++ b/samples/client/petstore/go-experimental/auth_test.go @@ -37,11 +37,11 @@ func TestOAuth2(t *testing.T) { tokenSource := cfg.TokenSource(createContext(nil), &tok) auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -50,7 +50,7 @@ func TestOAuth2(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -72,11 +72,11 @@ func TestBasicAuth(t *testing.T) { Password: "f4k3p455", }) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(auth, newPet) + r, err := client.PetAPI.AddPet(auth, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -85,7 +85,7 @@ func TestBasicAuth(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -102,11 +102,11 @@ func TestBasicAuth(t *testing.T) { func TestAccessToken(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -115,7 +115,7 @@ func TestAccessToken(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -132,11 +132,11 @@ func TestAccessToken(t *testing.T) { func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -145,7 +145,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetAPI.GetPetByID(auth, 12992) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -155,7 +155,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -167,11 +167,11 @@ func TestAPIKeyNoPrefix(t *testing.T) { func TestAPIKeyWithPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -180,7 +180,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetAPI.GetPetByID(auth, 12992) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -190,7 +190,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -200,11 +200,11 @@ func TestAPIKeyWithPrefix(t *testing.T) { } func TestDefaultHeader(t *testing.T) { - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12992), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -213,7 +213,7 @@ func TestDefaultHeader(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(context.Background(), 12992, nil) + r, err = client.PetAPI.DeletePet(context.Background(), 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -228,7 +228,7 @@ func TestDefaultHeader(t *testing.T) { } func TestHostOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while finding pets by status: %v", err) @@ -240,7 +240,7 @@ func TestHostOverride(t *testing.T) { } func TestSchemeOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while finding pets by status: %v", err) diff --git a/samples/client/petstore/go-experimental/fake_api_test.go b/samples/client/petstore/go-experimental/fake_api_test.go index e97bcb4846a8..cb923b1fe13f 100644 --- a/samples/client/petstore/go-experimental/fake_api_test.go +++ b/samples/client/petstore/go-experimental/fake_api_test.go @@ -17,7 +17,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")}, Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} - r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema) + r, err := client.FakeAPI.TestBodyWithFileSchema(context.Background(), schema) if err != nil { t.Fatalf("Error while adding pet: %v", err) diff --git a/samples/client/petstore/go-experimental/go-petstore/README.md b/samples/client/petstore/go-experimental/go-petstore/README.md index 1c8be349e65b..57b0346b95df 100644 --- a/samples/client/petstore/go-experimental/go-petstore/README.md +++ b/samples/client/petstore/go-experimental/go-petstore/README.md @@ -73,47 +73,48 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user +*AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*FakeAPI* | [**CreateXMLItem**](docs/FakeAPI.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem +*FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**TestJSONFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store +*PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**GetPetByID**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet +*PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**GetOrderByID**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user +*UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system +*UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user ## Documentation For Models + - [APIResponse](docs/APIResponse.md) - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) @@ -123,7 +124,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [Animal](docs/Animal.md) - - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) @@ -161,7 +161,7 @@ Class | Method | HTTP request | Description - [TypeHolderDefault](docs/TypeHolderDefault.md) - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) + - [XMLItem](docs/XMLItem.md) ## Documentation For Authorization diff --git a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go index f5e420b84fa3..f18d6d73cc9b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// AnotherFakeApiService AnotherFakeApi service -type AnotherFakeApiService service +// AnotherFakeAPIService AnotherFakeAPI service +type AnotherFakeAPIService service /* Call123TestSpecialTags To test special tags @@ -31,7 +31,7 @@ To test special tags and operation ID starting with number * @param body client model @return Client */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeApiService.Call123TestSpecialTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeAPIService.Call123TestSpecialTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go index d31e1b9139cb..56376c5ce089 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go @@ -24,16 +24,16 @@ var ( _ _context.Context ) -// FakeApiService FakeApi service -type FakeApiService service +// FakeAPIService FakeAPI service +type FakeAPIService service /* -CreateXmlItem creates an XmlItem +CreateXMLItem creates an XmlItem this route creates an XmlItem * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param xmlItem XmlItem Body + * @param xMLItem XmlItem Body */ -func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) { +func (a *FakeAPIService) CreateXMLItem(ctx _context.Context, xMLItem XMLItem) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -42,7 +42,7 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.CreateXmlItem") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.CreateXMLItem") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -71,7 +71,7 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &xmlItem + localVarPostBody = &xMLItem r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err @@ -112,7 +112,7 @@ Test serialization of outer boolean types * @param "Body" (optional.Bool) - Input boolean as post body @return bool */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -122,7 +122,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarReturnValue bool ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterBooleanSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterBooleanSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -213,7 +213,7 @@ Test serialization of object with outer number type * @param "Body" (optional.Interface of OuterComposite) - Input composite as post body @return OuterComposite */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -223,7 +223,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarReturnValue OuterComposite ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterCompositeSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterCompositeSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -318,7 +318,7 @@ Test serialization of outer number types * @param "Body" (optional.Float32) - Input number as post body @return float32 */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -328,7 +328,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarReturnValue float32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterNumberSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterNumberSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -419,7 +419,7 @@ Test serialization of outer string types * @param "Body" (optional.String) - Input string as post body @return string */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -429,7 +429,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterStringSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterStringSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -513,7 +513,7 @@ For this test, the body for this request much reference a schema named `Fil * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -522,7 +522,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithFileSchema") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestBodyWithFileSchema") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -585,7 +585,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param query * @param body */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -594,7 +594,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithQueryParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestBodyWithQueryParams") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -659,7 +659,7 @@ To test \"client\" model * @param body client model @return Client */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeAPIService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -669,7 +669,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestClientModel") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestClientModel") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -778,7 +778,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン * @param "Password" (optional.String) - None * @param "Callback" (optional.String) - None */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -787,7 +787,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEndpointParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestEndpointParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -926,7 +926,7 @@ To test enum parameters * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) * @param "EnumFormString" (optional.String) - Form parameter enum test (string) */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -935,7 +935,7 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEnumParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestEnumParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1033,7 +1033,7 @@ Fake endpoint to test group parameters (optional) * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters * @param "Int64Group" (optional.Int64) - Integer in group parameters */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1042,7 +1042,7 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestGroupParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestGroupParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1114,7 +1114,7 @@ TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param request body */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -1123,7 +1123,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestInlineAdditionalProperties") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestInlineAdditionalProperties") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1181,12 +1181,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa } /* -TestJsonFormData test json serialization of form data +TestJSONFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param field1 * @param param2 field2 */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestJSONFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1195,7 +1195,7 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestJsonFormData") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestJSONFormData") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1258,11 +1258,11 @@ To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pipe * @param ioutil - * @param http - * @param url + * @param hTTP + * @param uRL * @param context */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -1271,7 +1271,7 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestQueryParameterCollectionFormat") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestQueryParameterCollectionFormat") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1284,8 +1284,8 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarQueryParams.Add("pipe", parameterToString(pipe, "csv")) localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) + localVarQueryParams.Add("http", parameterToString(hTTP, "space")) + localVarQueryParams.Add("url", parameterToString(uRL, "csv")) t:=context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index ef129021d825..ad22a68331c5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// FakeClassnameTags123ApiService FakeClassnameTags123Api service -type FakeClassnameTags123ApiService service +// FakeClassnameTags123APIService FakeClassnameTags123API service +type FakeClassnameTags123APIService service /* TestClassname To test class name in snake case @@ -31,7 +31,7 @@ To test class name in snake case * @param body client model @return Client */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123APIService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123ApiService.TestClassname") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123APIService.TestClassname") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/client/petstore/go-experimental/go-petstore/api_pet.go index 9b397dabb97d..7da5cd558d24 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_pet.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// PetApiService PetApi service -type PetApiService service +// PetAPIService PetAPI service +type PetAPIService service /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.AddPet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.AddPet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -100,17 +100,17 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon // DeletePetOpts Optional parameters for the method 'DeletePet' type DeletePetOpts struct { - ApiKey optional.String + APIKey optional.String } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId Pet id to delete + * @param petID Pet id to delete * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - + * @param "APIKey" (optional.String) - */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) DeletePet(ctx _context.Context, petID int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -119,13 +119,13 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.DeletePet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.DeletePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -148,8 +148,8 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if localVarOptionals != nil && localVarOptionals.APIKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.APIKey.Value(), "") } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { @@ -185,7 +185,7 @@ Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter @return []Pet */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -195,7 +195,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByStatus") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.FindPetsByStatus") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -277,7 +277,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 * @param tags Tags to filter by @return []Pet */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -287,7 +287,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.FindPetsByTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -363,13 +363,13 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } /* -GetPetById Find pet by ID +GetPetByID Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to return + * @param petID ID of pet to return @return Pet */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetAPIService) GetPetByID(ctx _context.Context, petID int64) (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -379,13 +379,13 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne localVarReturnValue Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.GetPetById") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.GetPetByID") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -473,7 +473,7 @@ UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -482,7 +482,7 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Res localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UpdatePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -548,12 +548,12 @@ type UpdatePetWithFormOpts struct { /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet that needs to be updated + * @param petID ID of pet that needs to be updated * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: * @param "Name" (optional.String) - Updated name of the pet * @param "Status" (optional.String) - Updated status of the pet */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePetWithForm(ctx _context.Context, petID int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -562,13 +562,13 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePetWithForm") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UpdatePetWithForm") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -633,29 +633,29 @@ type UploadFileOpts struct { /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param optional nil or *UploadFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFile(ctx _context.Context, petID int64, localVarOptionals *UploadFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UploadFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -718,7 +718,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -749,29 +749,29 @@ type UploadFileWithRequiredFileOpts struct { /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFileWithRequiredFile(ctx _context.Context, petID int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFileWithRequiredFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UploadFileWithRequiredFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -827,7 +827,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/samples/client/petstore/go-experimental/go-petstore/api_store.go b/samples/client/petstore/go-experimental/go-petstore/api_store.go index 12047d173577..f369b0e9ec5e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_store.go @@ -22,16 +22,16 @@ var ( _ _context.Context ) -// StoreApiService StoreApi service -type StoreApiService service +// StoreAPIService StoreAPI service +type StoreAPIService service /* DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of the order that needs to be deleted + * @param orderID ID of the order that needs to be deleted */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreAPIService) DeleteOrder(ctx _context.Context, orderID string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -40,13 +40,13 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.DeleteOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.DeleteOrder") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -102,7 +102,7 @@ Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return map[string]int32 */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreAPIService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -112,7 +112,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, localVarReturnValue map[string]int32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetInventory") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.GetInventory") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -200,13 +200,13 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } /* -GetOrderById Find purchase order by ID +GetOrderByID Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of pet that needs to be fetched + * @param orderID ID of pet that needs to be fetched @return Order */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) GetOrderByID(ctx _context.Context, orderID int64) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -216,22 +216,22 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetOrderById") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.GetOrderByID") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { - return localVarReturnValue, nil, reportError("orderId must be greater than 1") + if orderID < 1 { + return localVarReturnValue, nil, reportError("orderID must be greater than 1") } - if orderId > 5 { - return localVarReturnValue, nil, reportError("orderId must be less than 5") + if orderID > 5 { + return localVarReturnValue, nil, reportError("orderID must be less than 5") } // to determine the Content-Type header @@ -303,7 +303,7 @@ PlaceOrder Place an order for a pet * @param body order placed for purchasing the pet @return Order */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -313,7 +313,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.PlaceOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.PlaceOrder") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_user.go b/samples/client/petstore/go-experimental/go-petstore/api_user.go index 5689de23b63c..14f47a3dd062 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_user.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service /* CreateUser Create user @@ -31,7 +31,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Created user object */ -func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -40,7 +40,7 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp. localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -102,7 +102,7 @@ CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -111,7 +111,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body [] localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithArrayInput") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUsersWithArrayInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -173,7 +173,7 @@ CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -182,7 +182,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithListInput") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUsersWithListInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -245,7 +245,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserAPIService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -254,7 +254,7 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.DeleteUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.DeleteUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -316,7 +316,7 @@ GetUserByName Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @return User */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserAPIService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -326,7 +326,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U localVarReturnValue User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.GetUserByName") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.GetUserByName") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -408,7 +408,7 @@ LoginUser Logs user into the system * @param password The password for login in clear text @return string */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserAPIService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -418,7 +418,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LoginUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.LoginUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -498,7 +498,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserAPIService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -507,7 +507,7 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LogoutUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.LogoutUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -569,7 +569,7 @@ This can only be done by the logged in user. * @param username name that need to be deleted * @param body Updated user object */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -578,7 +578,7 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.UpdateUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.UpdateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/client/petstore/go-experimental/go-petstore/client.go b/samples/client/petstore/go-experimental/go-petstore/client.go index 4c4ecf168f41..ad0ea3e98c75 100644 --- a/samples/client/petstore/go-experimental/go-petstore/client.go +++ b/samples/client/petstore/go-experimental/go-petstore/client.go @@ -47,17 +47,17 @@ type APIClient struct { // API Services - AnotherFakeApi *AnotherFakeApiService + AnotherFakeAPI *AnotherFakeAPIService - FakeApi *FakeApiService + FakeAPI *FakeAPIService - FakeClassnameTags123Api *FakeClassnameTags123ApiService + FakeClassnameTags123API *FakeClassnameTags123APIService - PetApi *PetApiService + PetAPI *PetAPIService - StoreApi *StoreApiService + StoreAPI *StoreAPIService - UserApi *UserApiService + UserAPI *UserAPIService } type service struct { @@ -76,12 +76,12 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) - c.FakeApi = (*FakeApiService)(&c.common) - c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) - c.PetApi = (*PetApiService)(&c.common) - c.StoreApi = (*StoreApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) + c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common) + c.FakeAPI = (*FakeAPIService)(&c.common) + c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common) + c.PetAPI = (*PetAPIService)(&c.common) + c.StoreAPI = (*StoreAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) return c } diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go-experimental/go-petstore/docs/APIResponse.md similarity index 75% rename from samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md rename to samples/client/petstore/go-experimental/go-petstore/docs/APIResponse.md index b0c891bbc960..1ea6b9177f92 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/APIResponse.md @@ -1,4 +1,4 @@ -# ApiResponse +# APIResponse ## Properties @@ -12,76 +12,76 @@ Name | Type | Description | Notes ### GetCode -`func (o *ApiResponse) GetCode() int32` +`func (o *APIResponse) GetCode() int32` GetCode returns the Code field if non-nil, zero value otherwise. ### GetCodeOk -`func (o *ApiResponse) GetCodeOk() (int32, bool)` +`func (o *APIResponse) GetCodeOk() (int32, bool)` GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasCode -`func (o *ApiResponse) HasCode() bool` +`func (o *APIResponse) HasCode() bool` HasCode returns a boolean if a field has been set. ### SetCode -`func (o *ApiResponse) SetCode(v int32)` +`func (o *APIResponse) SetCode(v int32)` SetCode gets a reference to the given int32 and assigns it to the Code field. ### GetType -`func (o *ApiResponse) GetType() string` +`func (o *APIResponse) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *ApiResponse) GetTypeOk() (string, bool)` +`func (o *APIResponse) GetTypeOk() (string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasType -`func (o *ApiResponse) HasType() bool` +`func (o *APIResponse) HasType() bool` HasType returns a boolean if a field has been set. ### SetType -`func (o *ApiResponse) SetType(v string)` +`func (o *APIResponse) SetType(v string)` SetType gets a reference to the given string and assigns it to the Type field. ### GetMessage -`func (o *ApiResponse) GetMessage() string` +`func (o *APIResponse) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *ApiResponse) GetMessageOk() (string, bool)` +`func (o *APIResponse) GetMessageOk() (string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasMessage -`func (o *ApiResponse) HasMessage() bool` +`func (o *APIResponse) HasMessage() bool` HasMessage returns a boolean if a field has been set. ### SetMessage -`func (o *ApiResponse) SetMessage(v string)` +`func (o *APIResponse) SetMessage(v string)` SetMessage gets a reference to the given string and assigns it to the Message field. diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md similarity index 92% rename from samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md rename to samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md index 2c22f8f1b307..369a45ce0faa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md @@ -1,10 +1,10 @@ -# \AnotherFakeApi +# \AnotherFakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags +[**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md index 88b525bade15..b10d17f3924b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -4,35 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Name** | Pointer to **string** | | [default to default-name] ## Methods -### GetId +### GetID -`func (o *Category) GetId() int64` +`func (o *Category) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Category) GetIdOk() (int64, bool)` +`func (o *Category) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Category) HasId() bool` +`func (o *Category) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Category) SetId(v int64)` +`func (o *Category) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetName diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore/docs/FakeApi.md rename to samples/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md index 1d85fdf9d313..ac1757e9cf15 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md @@ -1,29 +1,29 @@ -# \FakeApi +# \FakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#CreateXmlItem) | **Post** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | +[**CreateXMLItem**](FakeAPI.md#CreateXMLItem) | **Post** /fake/create_xml_item | creates an XmlItem +[**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJSONFormData**](FakeAPI.md#TestJSONFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | -## CreateXmlItem +## CreateXMLItem -> CreateXmlItem(ctx, xmlItem) +> CreateXMLItem(ctx, xMLItem) creates an XmlItem @@ -35,7 +35,7 @@ this route creates an XmlItem Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +**xMLItem** | [**XMLItem**](XMLItem.md)| XmlItem Body | ### Return type @@ -521,9 +521,9 @@ No authorization required [[Back to README]](../README.md) -## TestJsonFormData +## TestJSONFormData -> TestJsonFormData(ctx, param, param2) +> TestJSONFormData(ctx, param, param2) test json serialization of form data @@ -556,7 +556,7 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, hTTP, uRL, context) @@ -570,8 +570,8 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **pipe** | [**[]string**](string.md)| | **ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | +**hTTP** | [**[]string**](string.md)| | +**uRL** | [**[]string**](string.md)| | **context** | [**[]string**](string.md)| | ### Return type diff --git a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md similarity index 91% rename from samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md rename to samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md index 224542b70517..66bf7bd6ec03 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md @@ -1,10 +1,10 @@ -# \FakeClassnameTags123Api +# \FakeClassnameTags123API All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case +[**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index c1633f9cae28..1f2dc6b029c5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Binary** | Pointer to [***os.File**](*os.File.md) | | [optional] **Date** | Pointer to **string** | | **DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] -**Uuid** | Pointer to **string** | | [optional] +**UUID** | Pointer to **string** | | [optional] **Password** | Pointer to **string** | | **BigDecimal** | Pointer to **float64** | | [optional] @@ -296,30 +296,30 @@ HasDateTime returns a boolean if a field has been set. SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. -### GetUuid +### GetUUID -`func (o *FormatTest) GetUuid() string` +`func (o *FormatTest) GetUUID() string` -GetUuid returns the Uuid field if non-nil, zero value otherwise. +GetUUID returns the UUID field if non-nil, zero value otherwise. -### GetUuidOk +### GetUUIDOk -`func (o *FormatTest) GetUuidOk() (string, bool)` +`func (o *FormatTest) GetUUIDOk() (string, bool)` -GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +GetUUIDOk returns a tuple with the UUID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasUuid +### HasUUID -`func (o *FormatTest) HasUuid() bool` +`func (o *FormatTest) HasUUID() bool` -HasUuid returns a boolean if a field has been set. +HasUUID returns a boolean if a field has been set. -### SetUuid +### SetUUID -`func (o *FormatTest) SetUuid(v string)` +`func (o *FormatTest) SetUUID(v string)` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +SetUUID gets a reference to the given string and assigns it to the UUID field. ### GetPassword diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 49f7c8eb7687..f56e3ee7c190 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,36 +4,36 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | Pointer to **string** | | [optional] +**UUID** | Pointer to **string** | | [optional] **DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] **Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional] ## Methods -### GetUuid +### GetUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUID() string` -GetUuid returns the Uuid field if non-nil, zero value otherwise. +GetUUID returns the UUID field if non-nil, zero value otherwise. -### GetUuidOk +### GetUUIDOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUIDOk() (string, bool)` -GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +GetUUIDOk returns a tuple with the UUID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasUuid +### HasUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUUID() bool` -HasUuid returns a boolean if a field has been set. +HasUUID returns a boolean if a field has been set. -### SetUuid +### SetUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUUID(v string)` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +SetUUID gets a reference to the given string and assigns it to the UUID field. ### GetDateTime diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md index 8aa8bbd1ee54..a5ed5f11b3cd 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] -**PetId** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] +**PetID** | Pointer to **int64** | | [optional] **Quantity** | Pointer to **int32** | | [optional] **ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] **Status** | Pointer to **string** | Order Status | [optional] @@ -13,55 +13,55 @@ Name | Type | Description | Notes ## Methods -### GetId +### GetID -`func (o *Order) GetId() int64` +`func (o *Order) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Order) GetIdOk() (int64, bool)` +`func (o *Order) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Order) HasId() bool` +`func (o *Order) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Order) SetId(v int64)` +`func (o *Order) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. -### GetPetId +### GetPetID -`func (o *Order) GetPetId() int64` +`func (o *Order) GetPetID() int64` -GetPetId returns the PetId field if non-nil, zero value otherwise. +GetPetID returns the PetID field if non-nil, zero value otherwise. -### GetPetIdOk +### GetPetIDOk -`func (o *Order) GetPetIdOk() (int64, bool)` +`func (o *Order) GetPetIDOk() (int64, bool)` -GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +GetPetIDOk returns a tuple with the PetID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPetId +### HasPetID -`func (o *Order) HasPetId() bool` +`func (o *Order) HasPetID() bool` -HasPetId returns a boolean if a field has been set. +HasPetID returns a boolean if a field has been set. -### SetPetId +### SetPetID -`func (o *Order) SetPetId(v int64)` +`func (o *Order) SetPetID(v int64)` -SetPetId gets a reference to the given int64 and assigns it to the PetId field. +SetPetID gets a reference to the given int64 and assigns it to the PetID field. ### GetQuantity diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md index dba9589f9d77..3026ffa877dd 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -4,39 +4,39 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Category** | Pointer to [**Category**](Category.md) | | [optional] **Name** | Pointer to **string** | | -**PhotoUrls** | Pointer to **[]string** | | +**PhotoURLs** | Pointer to **[]string** | | **Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] **Status** | Pointer to **string** | pet status in the store | [optional] ## Methods -### GetId +### GetID -`func (o *Pet) GetId() int64` +`func (o *Pet) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Pet) GetIdOk() (int64, bool)` +`func (o *Pet) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Pet) HasId() bool` +`func (o *Pet) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Pet) SetId(v int64)` +`func (o *Pet) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetCategory @@ -88,30 +88,30 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. -### GetPhotoUrls +### GetPhotoURLs -`func (o *Pet) GetPhotoUrls() []string` +`func (o *Pet) GetPhotoURLs() []string` -GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +GetPhotoURLs returns the PhotoURLs field if non-nil, zero value otherwise. -### GetPhotoUrlsOk +### GetPhotoURLsOk -`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` +`func (o *Pet) GetPhotoURLsOk() ([]string, bool)` -GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +GetPhotoURLsOk returns a tuple with the PhotoURLs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPhotoUrls +### HasPhotoURLs -`func (o *Pet) HasPhotoUrls() bool` +`func (o *Pet) HasPhotoURLs() bool` -HasPhotoUrls returns a boolean if a field has been set. +HasPhotoURLs returns a boolean if a field has been set. -### SetPhotoUrls +### SetPhotoURLs -`func (o *Pet) SetPhotoUrls(v []string)` +`func (o *Pet) SetPhotoURLs(v []string)` -SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +SetPhotoURLs gets a reference to the given []string and assigns it to the PhotoURLs field. ### GetTags diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/PetAPI.md similarity index 88% rename from samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md rename to samples/client/petstore/go-experimental/go-petstore/docs/PetAPI.md index 6ee9afef754b..91282f7096f2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/PetAPI.md @@ -1,18 +1,18 @@ -# \PetApi +# \PetAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetByID**](PetAPI.md#GetPetByID) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) @@ -50,7 +50,7 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petID, optional) Deletes a pet @@ -60,7 +60,7 @@ Deletes a pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | +**petID** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a pointer to a DeletePetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **aPIKey** | **optional.String**| | ### Return type @@ -159,9 +159,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPetById +## GetPetByID -> Pet GetPetById(ctx, petId) +> Pet GetPetByID(ctx, petID) Find pet by ID @@ -173,7 +173,7 @@ Returns a single pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petID** | **int64**| ID of pet to return | ### Return type @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petID, optional) Updates a pet in the store with form data @@ -237,7 +237,7 @@ Updates a pet in the store with form data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | +**petID** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> APIResponse UploadFile(ctx, petID, optional) uploads an image @@ -281,7 +281,7 @@ uploads an image Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -297,7 +297,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> APIResponse UploadFileWithRequiredFile(ctx, petID, requiredFile, optional) uploads an image (required) @@ -325,7 +325,7 @@ uploads an image (required) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters @@ -342,7 +342,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md similarity index 86% rename from samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md rename to samples/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md index 531ab09ff688..569c1c55ca34 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md @@ -1,19 +1,19 @@ -# \StoreApi +# \StoreAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet +[**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderByID**](StoreAPI.md#GetOrderByID) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderID) Delete purchase order by ID @@ -25,7 +25,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderID** | **string**| ID of the order that needs to be deleted | ### Return type @@ -75,9 +75,9 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) -## GetOrderById +## GetOrderByID -> Order GetOrderById(ctx, orderId) +> Order GetOrderByID(ctx, orderID) Find purchase order by ID @@ -89,7 +89,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderID** | **int64**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md index bf868298a5e7..689e7385128a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -4,35 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Name** | Pointer to **string** | | [optional] ## Methods -### GetId +### GetID -`func (o *Tag) GetId() int64` +`func (o *Tag) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Tag) GetIdOk() (int64, bool)` +`func (o *Tag) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Tag) HasId() bool` +`func (o *Tag) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Tag) SetId(v int64)` +`func (o *Tag) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetName diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/client/petstore/go-experimental/go-petstore/docs/User.md index 8b93a65d8ab7..803486192001 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Username** | Pointer to **string** | | [optional] **FirstName** | Pointer to **string** | | [optional] **LastName** | Pointer to **string** | | [optional] @@ -15,30 +15,30 @@ Name | Type | Description | Notes ## Methods -### GetId +### GetID -`func (o *User) GetId() int64` +`func (o *User) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *User) GetIdOk() (int64, bool)` +`func (o *User) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *User) HasId() bool` +`func (o *User) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *User) SetId(v int64)` +`func (o *User) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetUsername diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/UserAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore/docs/UserApi.md rename to samples/client/petstore/go-experimental/go-petstore/docs/UserAPI.md index d9f16bb5fb0e..549b3eb6c273 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/UserAPI.md @@ -1,17 +1,17 @@ -# \UserApi +# \UserAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md b/samples/client/petstore/go-experimental/go-petstore/docs/XMLItem.md similarity index 74% rename from samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md rename to samples/client/petstore/go-experimental/go-petstore/docs/XMLItem.md index 99c95015d5ff..a7966215a153 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/XMLItem.md @@ -1,4 +1,4 @@ -# XmlItem +# XMLItem ## Properties @@ -38,726 +38,726 @@ Name | Type | Description | Notes ### GetAttributeString -`func (o *XmlItem) GetAttributeString() string` +`func (o *XMLItem) GetAttributeString() string` GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. ### GetAttributeStringOk -`func (o *XmlItem) GetAttributeStringOk() (string, bool)` +`func (o *XMLItem) GetAttributeStringOk() (string, bool)` GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasAttributeString -`func (o *XmlItem) HasAttributeString() bool` +`func (o *XMLItem) HasAttributeString() bool` HasAttributeString returns a boolean if a field has been set. ### SetAttributeString -`func (o *XmlItem) SetAttributeString(v string)` +`func (o *XMLItem) SetAttributeString(v string)` SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. ### GetAttributeNumber -`func (o *XmlItem) GetAttributeNumber() float32` +`func (o *XMLItem) GetAttributeNumber() float32` GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. ### GetAttributeNumberOk -`func (o *XmlItem) GetAttributeNumberOk() (float32, bool)` +`func (o *XMLItem) GetAttributeNumberOk() (float32, bool)` GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasAttributeNumber -`func (o *XmlItem) HasAttributeNumber() bool` +`func (o *XMLItem) HasAttributeNumber() bool` HasAttributeNumber returns a boolean if a field has been set. ### SetAttributeNumber -`func (o *XmlItem) SetAttributeNumber(v float32)` +`func (o *XMLItem) SetAttributeNumber(v float32)` SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. ### GetAttributeInteger -`func (o *XmlItem) GetAttributeInteger() int32` +`func (o *XMLItem) GetAttributeInteger() int32` GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. ### GetAttributeIntegerOk -`func (o *XmlItem) GetAttributeIntegerOk() (int32, bool)` +`func (o *XMLItem) GetAttributeIntegerOk() (int32, bool)` GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasAttributeInteger -`func (o *XmlItem) HasAttributeInteger() bool` +`func (o *XMLItem) HasAttributeInteger() bool` HasAttributeInteger returns a boolean if a field has been set. ### SetAttributeInteger -`func (o *XmlItem) SetAttributeInteger(v int32)` +`func (o *XMLItem) SetAttributeInteger(v int32)` SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. ### GetAttributeBoolean -`func (o *XmlItem) GetAttributeBoolean() bool` +`func (o *XMLItem) GetAttributeBoolean() bool` GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. ### GetAttributeBooleanOk -`func (o *XmlItem) GetAttributeBooleanOk() (bool, bool)` +`func (o *XMLItem) GetAttributeBooleanOk() (bool, bool)` GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasAttributeBoolean -`func (o *XmlItem) HasAttributeBoolean() bool` +`func (o *XMLItem) HasAttributeBoolean() bool` HasAttributeBoolean returns a boolean if a field has been set. ### SetAttributeBoolean -`func (o *XmlItem) SetAttributeBoolean(v bool)` +`func (o *XMLItem) SetAttributeBoolean(v bool)` SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. ### GetWrappedArray -`func (o *XmlItem) GetWrappedArray() []int32` +`func (o *XMLItem) GetWrappedArray() []int32` GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. ### GetWrappedArrayOk -`func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetWrappedArrayOk() ([]int32, bool)` GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasWrappedArray -`func (o *XmlItem) HasWrappedArray() bool` +`func (o *XMLItem) HasWrappedArray() bool` HasWrappedArray returns a boolean if a field has been set. ### SetWrappedArray -`func (o *XmlItem) SetWrappedArray(v []int32)` +`func (o *XMLItem) SetWrappedArray(v []int32)` SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. ### GetNameString -`func (o *XmlItem) GetNameString() string` +`func (o *XMLItem) GetNameString() string` GetNameString returns the NameString field if non-nil, zero value otherwise. ### GetNameStringOk -`func (o *XmlItem) GetNameStringOk() (string, bool)` +`func (o *XMLItem) GetNameStringOk() (string, bool)` GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameString -`func (o *XmlItem) HasNameString() bool` +`func (o *XMLItem) HasNameString() bool` HasNameString returns a boolean if a field has been set. ### SetNameString -`func (o *XmlItem) SetNameString(v string)` +`func (o *XMLItem) SetNameString(v string)` SetNameString gets a reference to the given string and assigns it to the NameString field. ### GetNameNumber -`func (o *XmlItem) GetNameNumber() float32` +`func (o *XMLItem) GetNameNumber() float32` GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. ### GetNameNumberOk -`func (o *XmlItem) GetNameNumberOk() (float32, bool)` +`func (o *XMLItem) GetNameNumberOk() (float32, bool)` GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameNumber -`func (o *XmlItem) HasNameNumber() bool` +`func (o *XMLItem) HasNameNumber() bool` HasNameNumber returns a boolean if a field has been set. ### SetNameNumber -`func (o *XmlItem) SetNameNumber(v float32)` +`func (o *XMLItem) SetNameNumber(v float32)` SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. ### GetNameInteger -`func (o *XmlItem) GetNameInteger() int32` +`func (o *XMLItem) GetNameInteger() int32` GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. ### GetNameIntegerOk -`func (o *XmlItem) GetNameIntegerOk() (int32, bool)` +`func (o *XMLItem) GetNameIntegerOk() (int32, bool)` GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameInteger -`func (o *XmlItem) HasNameInteger() bool` +`func (o *XMLItem) HasNameInteger() bool` HasNameInteger returns a boolean if a field has been set. ### SetNameInteger -`func (o *XmlItem) SetNameInteger(v int32)` +`func (o *XMLItem) SetNameInteger(v int32)` SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. ### GetNameBoolean -`func (o *XmlItem) GetNameBoolean() bool` +`func (o *XMLItem) GetNameBoolean() bool` GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. ### GetNameBooleanOk -`func (o *XmlItem) GetNameBooleanOk() (bool, bool)` +`func (o *XMLItem) GetNameBooleanOk() (bool, bool)` GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameBoolean -`func (o *XmlItem) HasNameBoolean() bool` +`func (o *XMLItem) HasNameBoolean() bool` HasNameBoolean returns a boolean if a field has been set. ### SetNameBoolean -`func (o *XmlItem) SetNameBoolean(v bool)` +`func (o *XMLItem) SetNameBoolean(v bool)` SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. ### GetNameArray -`func (o *XmlItem) GetNameArray() []int32` +`func (o *XMLItem) GetNameArray() []int32` GetNameArray returns the NameArray field if non-nil, zero value otherwise. ### GetNameArrayOk -`func (o *XmlItem) GetNameArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetNameArrayOk() ([]int32, bool)` GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameArray -`func (o *XmlItem) HasNameArray() bool` +`func (o *XMLItem) HasNameArray() bool` HasNameArray returns a boolean if a field has been set. ### SetNameArray -`func (o *XmlItem) SetNameArray(v []int32)` +`func (o *XMLItem) SetNameArray(v []int32)` SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. ### GetNameWrappedArray -`func (o *XmlItem) GetNameWrappedArray() []int32` +`func (o *XMLItem) GetNameWrappedArray() []int32` GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. ### GetNameWrappedArrayOk -`func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetNameWrappedArrayOk() ([]int32, bool)` GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNameWrappedArray -`func (o *XmlItem) HasNameWrappedArray() bool` +`func (o *XMLItem) HasNameWrappedArray() bool` HasNameWrappedArray returns a boolean if a field has been set. ### SetNameWrappedArray -`func (o *XmlItem) SetNameWrappedArray(v []int32)` +`func (o *XMLItem) SetNameWrappedArray(v []int32)` SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. ### GetPrefixString -`func (o *XmlItem) GetPrefixString() string` +`func (o *XMLItem) GetPrefixString() string` GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. ### GetPrefixStringOk -`func (o *XmlItem) GetPrefixStringOk() (string, bool)` +`func (o *XMLItem) GetPrefixStringOk() (string, bool)` GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixString -`func (o *XmlItem) HasPrefixString() bool` +`func (o *XMLItem) HasPrefixString() bool` HasPrefixString returns a boolean if a field has been set. ### SetPrefixString -`func (o *XmlItem) SetPrefixString(v string)` +`func (o *XMLItem) SetPrefixString(v string)` SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. ### GetPrefixNumber -`func (o *XmlItem) GetPrefixNumber() float32` +`func (o *XMLItem) GetPrefixNumber() float32` GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. ### GetPrefixNumberOk -`func (o *XmlItem) GetPrefixNumberOk() (float32, bool)` +`func (o *XMLItem) GetPrefixNumberOk() (float32, bool)` GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNumber -`func (o *XmlItem) HasPrefixNumber() bool` +`func (o *XMLItem) HasPrefixNumber() bool` HasPrefixNumber returns a boolean if a field has been set. ### SetPrefixNumber -`func (o *XmlItem) SetPrefixNumber(v float32)` +`func (o *XMLItem) SetPrefixNumber(v float32)` SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. ### GetPrefixInteger -`func (o *XmlItem) GetPrefixInteger() int32` +`func (o *XMLItem) GetPrefixInteger() int32` GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. ### GetPrefixIntegerOk -`func (o *XmlItem) GetPrefixIntegerOk() (int32, bool)` +`func (o *XMLItem) GetPrefixIntegerOk() (int32, bool)` GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixInteger -`func (o *XmlItem) HasPrefixInteger() bool` +`func (o *XMLItem) HasPrefixInteger() bool` HasPrefixInteger returns a boolean if a field has been set. ### SetPrefixInteger -`func (o *XmlItem) SetPrefixInteger(v int32)` +`func (o *XMLItem) SetPrefixInteger(v int32)` SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. ### GetPrefixBoolean -`func (o *XmlItem) GetPrefixBoolean() bool` +`func (o *XMLItem) GetPrefixBoolean() bool` GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. ### GetPrefixBooleanOk -`func (o *XmlItem) GetPrefixBooleanOk() (bool, bool)` +`func (o *XMLItem) GetPrefixBooleanOk() (bool, bool)` GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixBoolean -`func (o *XmlItem) HasPrefixBoolean() bool` +`func (o *XMLItem) HasPrefixBoolean() bool` HasPrefixBoolean returns a boolean if a field has been set. ### SetPrefixBoolean -`func (o *XmlItem) SetPrefixBoolean(v bool)` +`func (o *XMLItem) SetPrefixBoolean(v bool)` SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. ### GetPrefixArray -`func (o *XmlItem) GetPrefixArray() []int32` +`func (o *XMLItem) GetPrefixArray() []int32` GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. ### GetPrefixArrayOk -`func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetPrefixArrayOk() ([]int32, bool)` GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixArray -`func (o *XmlItem) HasPrefixArray() bool` +`func (o *XMLItem) HasPrefixArray() bool` HasPrefixArray returns a boolean if a field has been set. ### SetPrefixArray -`func (o *XmlItem) SetPrefixArray(v []int32)` +`func (o *XMLItem) SetPrefixArray(v []int32)` SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. ### GetPrefixWrappedArray -`func (o *XmlItem) GetPrefixWrappedArray() []int32` +`func (o *XMLItem) GetPrefixWrappedArray() []int32` GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. ### GetPrefixWrappedArrayOk -`func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetPrefixWrappedArrayOk() ([]int32, bool)` GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixWrappedArray -`func (o *XmlItem) HasPrefixWrappedArray() bool` +`func (o *XMLItem) HasPrefixWrappedArray() bool` HasPrefixWrappedArray returns a boolean if a field has been set. ### SetPrefixWrappedArray -`func (o *XmlItem) SetPrefixWrappedArray(v []int32)` +`func (o *XMLItem) SetPrefixWrappedArray(v []int32)` SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. ### GetNamespaceString -`func (o *XmlItem) GetNamespaceString() string` +`func (o *XMLItem) GetNamespaceString() string` GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. ### GetNamespaceStringOk -`func (o *XmlItem) GetNamespaceStringOk() (string, bool)` +`func (o *XMLItem) GetNamespaceStringOk() (string, bool)` GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceString -`func (o *XmlItem) HasNamespaceString() bool` +`func (o *XMLItem) HasNamespaceString() bool` HasNamespaceString returns a boolean if a field has been set. ### SetNamespaceString -`func (o *XmlItem) SetNamespaceString(v string)` +`func (o *XMLItem) SetNamespaceString(v string)` SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. ### GetNamespaceNumber -`func (o *XmlItem) GetNamespaceNumber() float32` +`func (o *XMLItem) GetNamespaceNumber() float32` GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. ### GetNamespaceNumberOk -`func (o *XmlItem) GetNamespaceNumberOk() (float32, bool)` +`func (o *XMLItem) GetNamespaceNumberOk() (float32, bool)` GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceNumber -`func (o *XmlItem) HasNamespaceNumber() bool` +`func (o *XMLItem) HasNamespaceNumber() bool` HasNamespaceNumber returns a boolean if a field has been set. ### SetNamespaceNumber -`func (o *XmlItem) SetNamespaceNumber(v float32)` +`func (o *XMLItem) SetNamespaceNumber(v float32)` SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. ### GetNamespaceInteger -`func (o *XmlItem) GetNamespaceInteger() int32` +`func (o *XMLItem) GetNamespaceInteger() int32` GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. ### GetNamespaceIntegerOk -`func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool)` +`func (o *XMLItem) GetNamespaceIntegerOk() (int32, bool)` GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceInteger -`func (o *XmlItem) HasNamespaceInteger() bool` +`func (o *XMLItem) HasNamespaceInteger() bool` HasNamespaceInteger returns a boolean if a field has been set. ### SetNamespaceInteger -`func (o *XmlItem) SetNamespaceInteger(v int32)` +`func (o *XMLItem) SetNamespaceInteger(v int32)` SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. ### GetNamespaceBoolean -`func (o *XmlItem) GetNamespaceBoolean() bool` +`func (o *XMLItem) GetNamespaceBoolean() bool` GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. ### GetNamespaceBooleanOk -`func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool)` +`func (o *XMLItem) GetNamespaceBooleanOk() (bool, bool)` GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceBoolean -`func (o *XmlItem) HasNamespaceBoolean() bool` +`func (o *XMLItem) HasNamespaceBoolean() bool` HasNamespaceBoolean returns a boolean if a field has been set. ### SetNamespaceBoolean -`func (o *XmlItem) SetNamespaceBoolean(v bool)` +`func (o *XMLItem) SetNamespaceBoolean(v bool)` SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. ### GetNamespaceArray -`func (o *XmlItem) GetNamespaceArray() []int32` +`func (o *XMLItem) GetNamespaceArray() []int32` GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. ### GetNamespaceArrayOk -`func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetNamespaceArrayOk() ([]int32, bool)` GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceArray -`func (o *XmlItem) HasNamespaceArray() bool` +`func (o *XMLItem) HasNamespaceArray() bool` HasNamespaceArray returns a boolean if a field has been set. ### SetNamespaceArray -`func (o *XmlItem) SetNamespaceArray(v []int32)` +`func (o *XMLItem) SetNamespaceArray(v []int32)` SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. ### GetNamespaceWrappedArray -`func (o *XmlItem) GetNamespaceWrappedArray() []int32` +`func (o *XMLItem) GetNamespaceWrappedArray() []int32` GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. ### GetNamespaceWrappedArrayOk -`func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetNamespaceWrappedArrayOk() ([]int32, bool)` GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasNamespaceWrappedArray -`func (o *XmlItem) HasNamespaceWrappedArray() bool` +`func (o *XMLItem) HasNamespaceWrappedArray() bool` HasNamespaceWrappedArray returns a boolean if a field has been set. ### SetNamespaceWrappedArray -`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)` +`func (o *XMLItem) SetNamespaceWrappedArray(v []int32)` SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. ### GetPrefixNsString -`func (o *XmlItem) GetPrefixNsString() string` +`func (o *XMLItem) GetPrefixNsString() string` GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. ### GetPrefixNsStringOk -`func (o *XmlItem) GetPrefixNsStringOk() (string, bool)` +`func (o *XMLItem) GetPrefixNsStringOk() (string, bool)` GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsString -`func (o *XmlItem) HasPrefixNsString() bool` +`func (o *XMLItem) HasPrefixNsString() bool` HasPrefixNsString returns a boolean if a field has been set. ### SetPrefixNsString -`func (o *XmlItem) SetPrefixNsString(v string)` +`func (o *XMLItem) SetPrefixNsString(v string)` SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. ### GetPrefixNsNumber -`func (o *XmlItem) GetPrefixNsNumber() float32` +`func (o *XMLItem) GetPrefixNsNumber() float32` GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. ### GetPrefixNsNumberOk -`func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool)` +`func (o *XMLItem) GetPrefixNsNumberOk() (float32, bool)` GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsNumber -`func (o *XmlItem) HasPrefixNsNumber() bool` +`func (o *XMLItem) HasPrefixNsNumber() bool` HasPrefixNsNumber returns a boolean if a field has been set. ### SetPrefixNsNumber -`func (o *XmlItem) SetPrefixNsNumber(v float32)` +`func (o *XMLItem) SetPrefixNsNumber(v float32)` SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. ### GetPrefixNsInteger -`func (o *XmlItem) GetPrefixNsInteger() int32` +`func (o *XMLItem) GetPrefixNsInteger() int32` GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. ### GetPrefixNsIntegerOk -`func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool)` +`func (o *XMLItem) GetPrefixNsIntegerOk() (int32, bool)` GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsInteger -`func (o *XmlItem) HasPrefixNsInteger() bool` +`func (o *XMLItem) HasPrefixNsInteger() bool` HasPrefixNsInteger returns a boolean if a field has been set. ### SetPrefixNsInteger -`func (o *XmlItem) SetPrefixNsInteger(v int32)` +`func (o *XMLItem) SetPrefixNsInteger(v int32)` SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. ### GetPrefixNsBoolean -`func (o *XmlItem) GetPrefixNsBoolean() bool` +`func (o *XMLItem) GetPrefixNsBoolean() bool` GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. ### GetPrefixNsBooleanOk -`func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool)` +`func (o *XMLItem) GetPrefixNsBooleanOk() (bool, bool)` GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsBoolean -`func (o *XmlItem) HasPrefixNsBoolean() bool` +`func (o *XMLItem) HasPrefixNsBoolean() bool` HasPrefixNsBoolean returns a boolean if a field has been set. ### SetPrefixNsBoolean -`func (o *XmlItem) SetPrefixNsBoolean(v bool)` +`func (o *XMLItem) SetPrefixNsBoolean(v bool)` SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. ### GetPrefixNsArray -`func (o *XmlItem) GetPrefixNsArray() []int32` +`func (o *XMLItem) GetPrefixNsArray() []int32` GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. ### GetPrefixNsArrayOk -`func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetPrefixNsArrayOk() ([]int32, bool)` GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsArray -`func (o *XmlItem) HasPrefixNsArray() bool` +`func (o *XMLItem) HasPrefixNsArray() bool` HasPrefixNsArray returns a boolean if a field has been set. ### SetPrefixNsArray -`func (o *XmlItem) SetPrefixNsArray(v []int32)` +`func (o *XMLItem) SetPrefixNsArray(v []int32)` SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. ### GetPrefixNsWrappedArray -`func (o *XmlItem) GetPrefixNsWrappedArray() []int32` +`func (o *XMLItem) GetPrefixNsWrappedArray() []int32` GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. ### GetPrefixNsWrappedArrayOk -`func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)` +`func (o *XMLItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)` GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasPrefixNsWrappedArray -`func (o *XmlItem) HasPrefixNsWrappedArray() bool` +`func (o *XMLItem) HasPrefixNsWrappedArray() bool` HasPrefixNsWrappedArray returns a boolean if a field has been set. ### SetPrefixNsWrappedArray -`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)` +`func (o *XMLItem) SetPrefixNsWrappedArray(v []int32)` SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go index 0b9eab9f7595..e58466977aae 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -14,15 +14,15 @@ import ( "encoding/json" ) -// ApiResponse struct for ApiResponse -type ApiResponse struct { +// APIResponse struct for APIResponse +type APIResponse struct { Code *int32 `json:"code,omitempty"` Type *string `json:"type,omitempty"` Message *string `json:"message,omitempty"` } // GetCode returns the Code field value if set, zero value otherwise. -func (o *ApiResponse) GetCode() int32 { +func (o *APIResponse) GetCode() int32 { if o == nil || o.Code == nil { var ret int32 return ret @@ -32,7 +32,7 @@ func (o *ApiResponse) GetCode() int32 { // GetCodeOk returns a tuple with the Code field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetCodeOk() (int32, bool) { +func (o *APIResponse) GetCodeOk() (int32, bool) { if o == nil || o.Code == nil { var ret int32 return ret, false @@ -41,7 +41,7 @@ func (o *ApiResponse) GetCodeOk() (int32, bool) { } // HasCode returns a boolean if a field has been set. -func (o *ApiResponse) HasCode() bool { +func (o *APIResponse) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -50,12 +50,12 @@ func (o *ApiResponse) HasCode() bool { } // SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *ApiResponse) SetCode(v int32) { +func (o *APIResponse) SetCode(v int32) { o.Code = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *ApiResponse) GetType() string { +func (o *APIResponse) GetType() string { if o == nil || o.Type == nil { var ret string return ret @@ -65,7 +65,7 @@ func (o *ApiResponse) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetTypeOk() (string, bool) { +func (o *APIResponse) GetTypeOk() (string, bool) { if o == nil || o.Type == nil { var ret string return ret, false @@ -74,7 +74,7 @@ func (o *ApiResponse) GetTypeOk() (string, bool) { } // HasType returns a boolean if a field has been set. -func (o *ApiResponse) HasType() bool { +func (o *APIResponse) HasType() bool { if o != nil && o.Type != nil { return true } @@ -83,12 +83,12 @@ func (o *ApiResponse) HasType() bool { } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *ApiResponse) SetType(v string) { +func (o *APIResponse) SetType(v string) { o.Type = &v } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ApiResponse) GetMessage() string { +func (o *APIResponse) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -98,7 +98,7 @@ func (o *ApiResponse) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetMessageOk() (string, bool) { +func (o *APIResponse) GetMessageOk() (string, bool) { if o == nil || o.Message == nil { var ret string return ret, false @@ -107,7 +107,7 @@ func (o *ApiResponse) GetMessageOk() (string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *ApiResponse) HasMessage() bool { +func (o *APIResponse) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -116,16 +116,16 @@ func (o *ApiResponse) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ApiResponse) SetMessage(v string) { +func (o *APIResponse) SetMessage(v string) { o.Message = &v } -type NullableApiResponse struct { - Value ApiResponse +type NullableAPIResponse struct { + Value APIResponse ExplicitNull bool } -func (v NullableApiResponse) MarshalJSON() ([]byte, error) { +func (v NullableAPIResponse) MarshalJSON() ([]byte, error) { switch { case v.ExplicitNull: return []byte("null"), nil @@ -134,7 +134,7 @@ func (v NullableApiResponse) MarshalJSON() ([]byte, error) { } } -func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { +func (v *NullableAPIResponse) UnmarshalJSON(src []byte) error { if bytes.Equal(src, []byte("null")) { v.ExplicitNull = true return nil diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go index 0bf8c0a2fd2c..46a51d5a65b5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go @@ -16,41 +16,41 @@ import ( // Category struct for Category type Category struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name string `json:"name"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Category) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Category) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Category) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Category) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Category) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Category) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Category) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Category) SetID(v int64) { + o.ID = &v } // GetName returns the Name field value diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go index 608a083d7eb1..433d7391224c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -29,7 +29,7 @@ type FormatTest struct { Binary **os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` - Uuid *string `json:"uuid,omitempty"` + UUID *string `json:"uuid,omitempty"` Password string `json:"password"` BigDecimal *float64 `json:"BigDecimal,omitempty"` } @@ -343,37 +343,37 @@ func (o *FormatTest) SetDateTime(v time.Time) { o.DateTime = &v } -// GetUuid returns the Uuid field value if set, zero value otherwise. -func (o *FormatTest) GetUuid() string { - if o == nil || o.Uuid == nil { +// GetUUID returns the UUID field value if set, zero value otherwise. +func (o *FormatTest) GetUUID() string { + if o == nil || o.UUID == nil { var ret string return ret } - return *o.Uuid + return *o.UUID } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUUIDOk returns a tuple with the UUID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetUuidOk() (string, bool) { - if o == nil || o.Uuid == nil { +func (o *FormatTest) GetUUIDOk() (string, bool) { + if o == nil || o.UUID == nil { var ret string return ret, false } - return *o.Uuid, true + return *o.UUID, true } -// HasUuid returns a boolean if a field has been set. -func (o *FormatTest) HasUuid() bool { - if o != nil && o.Uuid != nil { +// HasUUID returns a boolean if a field has been set. +func (o *FormatTest) HasUUID() bool { + if o != nil && o.UUID != nil { return true } return false } -// SetUuid gets a reference to the given string and assigns it to the Uuid field. -func (o *FormatTest) SetUuid(v string) { - o.Uuid = &v +// SetUUID gets a reference to the given string and assigns it to the UUID field. +func (o *FormatTest) SetUUID(v string) { + o.UUID = &v } // GetPassword returns the Password field value diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index c4a7dba81820..c67f78b2e4f0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -17,42 +17,42 @@ import ( // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid *string `json:"uuid,omitempty"` + UUID *string `json:"uuid,omitempty"` DateTime *time.Time `json:"dateTime,omitempty"` Map *map[string]Animal `json:"map,omitempty"` } -// GetUuid returns the Uuid field value if set, zero value otherwise. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { - if o == nil || o.Uuid == nil { +// GetUUID returns the UUID field value if set, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUID() string { + if o == nil || o.UUID == nil { var ret string return ret } - return *o.Uuid + return *o.UUID } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUUIDOk returns a tuple with the UUID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { - if o == nil || o.Uuid == nil { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUIDOk() (string, bool) { + if o == nil || o.UUID == nil { var ret string return ret, false } - return *o.Uuid, true + return *o.UUID, true } -// HasUuid returns a boolean if a field has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool { - if o != nil && o.Uuid != nil { +// HasUUID returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUUID() bool { + if o != nil && o.UUID != nil { return true } return false } -// SetUuid gets a reference to the given string and assigns it to the Uuid field. -func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { - o.Uuid = &v +// SetUUID gets a reference to the given string and assigns it to the UUID field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUUID(v string) { + o.UUID = &v } // GetDateTime returns the DateTime field value if set, zero value otherwise. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go index 448d6a975a47..4da698c5be29 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go @@ -17,8 +17,8 @@ import ( // Order struct for Order type Order struct { - Id *int64 `json:"id,omitempty"` - PetId *int64 `json:"petId,omitempty"` + ID *int64 `json:"id,omitempty"` + PetID *int64 `json:"petId,omitempty"` Quantity *int32 `json:"quantity,omitempty"` ShipDate *time.Time `json:"shipDate,omitempty"` // Order Status @@ -26,70 +26,70 @@ type Order struct { Complete *bool `json:"complete,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Order) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Order) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Order) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Order) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Order) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Order) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Order) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Order) SetID(v int64) { + o.ID = &v } -// GetPetId returns the PetId field value if set, zero value otherwise. -func (o *Order) GetPetId() int64 { - if o == nil || o.PetId == nil { +// GetPetID returns the PetID field value if set, zero value otherwise. +func (o *Order) GetPetID() int64 { + if o == nil || o.PetID == nil { var ret int64 return ret } - return *o.PetId + return *o.PetID } -// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise +// GetPetIDOk returns a tuple with the PetID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Order) GetPetIdOk() (int64, bool) { - if o == nil || o.PetId == nil { +func (o *Order) GetPetIDOk() (int64, bool) { + if o == nil || o.PetID == nil { var ret int64 return ret, false } - return *o.PetId, true + return *o.PetID, true } -// HasPetId returns a boolean if a field has been set. -func (o *Order) HasPetId() bool { - if o != nil && o.PetId != nil { +// HasPetID returns a boolean if a field has been set. +func (o *Order) HasPetID() bool { + if o != nil && o.PetID != nil { return true } return false } -// SetPetId gets a reference to the given int64 and assigns it to the PetId field. -func (o *Order) SetPetId(v int64) { - o.PetId = &v +// SetPetID gets a reference to the given int64 and assigns it to the PetID field. +func (o *Order) SetPetID(v int64) { + o.PetID = &v } // GetQuantity returns the Quantity field value if set, zero value otherwise. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go index 7c1228c8b61c..a8be1cb4546e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go @@ -16,46 +16,46 @@ import ( // Pet struct for Pet type Pet struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Category *Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags *[]Tag `json:"tags,omitempty"` // pet status in the store Status *string `json:"status,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Pet) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Pet) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Pet) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Pet) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Pet) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Pet) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Pet) SetID(v int64) { + o.ID = &v } // GetCategory returns the Category field value if set, zero value otherwise. @@ -106,19 +106,19 @@ func (o *Pet) SetName(v string) { o.Name = v } -// GetPhotoUrls returns the PhotoUrls field value -func (o *Pet) GetPhotoUrls() []string { +// GetPhotoURLs returns the PhotoURLs field value +func (o *Pet) GetPhotoURLs() []string { if o == nil { var ret []string return ret } - return o.PhotoUrls + return o.PhotoURLs } -// SetPhotoUrls sets field value -func (o *Pet) SetPhotoUrls(v []string) { - o.PhotoUrls = v +// SetPhotoURLs sets field value +func (o *Pet) SetPhotoURLs(v []string) { + o.PhotoURLs = v } // GetTags returns the Tags field value if set, zero value otherwise. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go index bcb30265ab28..8f0820aac1a5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go @@ -16,41 +16,41 @@ import ( // Tag struct for Tag type Tag struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name *string `json:"name,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Tag) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Tag) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Tag) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Tag) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Tag) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Tag) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Tag) SetID(v int64) { + o.ID = &v } // GetName returns the Name field value if set, zero value otherwise. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go index a427f7f7c247..842dc6aa8eb8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go @@ -16,7 +16,7 @@ import ( // User struct for User type User struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Username *string `json:"username,omitempty"` FirstName *string `json:"firstName,omitempty"` LastName *string `json:"lastName,omitempty"` @@ -27,37 +27,37 @@ type User struct { UserStatus *int32 `json:"userStatus,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *User) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *User) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *User) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *User) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *User) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *User) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *User) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *User) SetID(v int64) { + o.ID = &v } // GetUsername returns the Username field value if set, zero value otherwise. diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go index 6f81fca2b949..0559e1fef3bf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go @@ -14,8 +14,8 @@ import ( "encoding/json" ) -// XmlItem struct for XmlItem -type XmlItem struct { +// XMLItem struct for XMLItem +type XMLItem struct { AttributeString *string `json:"attribute_string,omitempty"` AttributeNumber *float32 `json:"attribute_number,omitempty"` AttributeInteger *int32 `json:"attribute_integer,omitempty"` @@ -48,7 +48,7 @@ type XmlItem struct { } // GetAttributeString returns the AttributeString field value if set, zero value otherwise. -func (o *XmlItem) GetAttributeString() string { +func (o *XMLItem) GetAttributeString() string { if o == nil || o.AttributeString == nil { var ret string return ret @@ -58,7 +58,7 @@ func (o *XmlItem) GetAttributeString() string { // GetAttributeStringOk returns a tuple with the AttributeString field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeStringOk() (string, bool) { +func (o *XMLItem) GetAttributeStringOk() (string, bool) { if o == nil || o.AttributeString == nil { var ret string return ret, false @@ -67,7 +67,7 @@ func (o *XmlItem) GetAttributeStringOk() (string, bool) { } // HasAttributeString returns a boolean if a field has been set. -func (o *XmlItem) HasAttributeString() bool { +func (o *XMLItem) HasAttributeString() bool { if o != nil && o.AttributeString != nil { return true } @@ -76,12 +76,12 @@ func (o *XmlItem) HasAttributeString() bool { } // SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. -func (o *XmlItem) SetAttributeString(v string) { +func (o *XMLItem) SetAttributeString(v string) { o.AttributeString = &v } // GetAttributeNumber returns the AttributeNumber field value if set, zero value otherwise. -func (o *XmlItem) GetAttributeNumber() float32 { +func (o *XMLItem) GetAttributeNumber() float32 { if o == nil || o.AttributeNumber == nil { var ret float32 return ret @@ -91,7 +91,7 @@ func (o *XmlItem) GetAttributeNumber() float32 { // GetAttributeNumberOk returns a tuple with the AttributeNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { +func (o *XMLItem) GetAttributeNumberOk() (float32, bool) { if o == nil || o.AttributeNumber == nil { var ret float32 return ret, false @@ -100,7 +100,7 @@ func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { } // HasAttributeNumber returns a boolean if a field has been set. -func (o *XmlItem) HasAttributeNumber() bool { +func (o *XMLItem) HasAttributeNumber() bool { if o != nil && o.AttributeNumber != nil { return true } @@ -109,12 +109,12 @@ func (o *XmlItem) HasAttributeNumber() bool { } // SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. -func (o *XmlItem) SetAttributeNumber(v float32) { +func (o *XMLItem) SetAttributeNumber(v float32) { o.AttributeNumber = &v } // GetAttributeInteger returns the AttributeInteger field value if set, zero value otherwise. -func (o *XmlItem) GetAttributeInteger() int32 { +func (o *XMLItem) GetAttributeInteger() int32 { if o == nil || o.AttributeInteger == nil { var ret int32 return ret @@ -124,7 +124,7 @@ func (o *XmlItem) GetAttributeInteger() int32 { // GetAttributeIntegerOk returns a tuple with the AttributeInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { +func (o *XMLItem) GetAttributeIntegerOk() (int32, bool) { if o == nil || o.AttributeInteger == nil { var ret int32 return ret, false @@ -133,7 +133,7 @@ func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { } // HasAttributeInteger returns a boolean if a field has been set. -func (o *XmlItem) HasAttributeInteger() bool { +func (o *XMLItem) HasAttributeInteger() bool { if o != nil && o.AttributeInteger != nil { return true } @@ -142,12 +142,12 @@ func (o *XmlItem) HasAttributeInteger() bool { } // SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. -func (o *XmlItem) SetAttributeInteger(v int32) { +func (o *XMLItem) SetAttributeInteger(v int32) { o.AttributeInteger = &v } // GetAttributeBoolean returns the AttributeBoolean field value if set, zero value otherwise. -func (o *XmlItem) GetAttributeBoolean() bool { +func (o *XMLItem) GetAttributeBoolean() bool { if o == nil || o.AttributeBoolean == nil { var ret bool return ret @@ -157,7 +157,7 @@ func (o *XmlItem) GetAttributeBoolean() bool { // GetAttributeBooleanOk returns a tuple with the AttributeBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { +func (o *XMLItem) GetAttributeBooleanOk() (bool, bool) { if o == nil || o.AttributeBoolean == nil { var ret bool return ret, false @@ -166,7 +166,7 @@ func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { } // HasAttributeBoolean returns a boolean if a field has been set. -func (o *XmlItem) HasAttributeBoolean() bool { +func (o *XMLItem) HasAttributeBoolean() bool { if o != nil && o.AttributeBoolean != nil { return true } @@ -175,12 +175,12 @@ func (o *XmlItem) HasAttributeBoolean() bool { } // SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. -func (o *XmlItem) SetAttributeBoolean(v bool) { +func (o *XMLItem) SetAttributeBoolean(v bool) { o.AttributeBoolean = &v } // GetWrappedArray returns the WrappedArray field value if set, zero value otherwise. -func (o *XmlItem) GetWrappedArray() []int32 { +func (o *XMLItem) GetWrappedArray() []int32 { if o == nil || o.WrappedArray == nil { var ret []int32 return ret @@ -190,7 +190,7 @@ func (o *XmlItem) GetWrappedArray() []int32 { // GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { +func (o *XMLItem) GetWrappedArrayOk() ([]int32, bool) { if o == nil || o.WrappedArray == nil { var ret []int32 return ret, false @@ -199,7 +199,7 @@ func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { } // HasWrappedArray returns a boolean if a field has been set. -func (o *XmlItem) HasWrappedArray() bool { +func (o *XMLItem) HasWrappedArray() bool { if o != nil && o.WrappedArray != nil { return true } @@ -208,12 +208,12 @@ func (o *XmlItem) HasWrappedArray() bool { } // SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. -func (o *XmlItem) SetWrappedArray(v []int32) { +func (o *XMLItem) SetWrappedArray(v []int32) { o.WrappedArray = &v } // GetNameString returns the NameString field value if set, zero value otherwise. -func (o *XmlItem) GetNameString() string { +func (o *XMLItem) GetNameString() string { if o == nil || o.NameString == nil { var ret string return ret @@ -223,7 +223,7 @@ func (o *XmlItem) GetNameString() string { // GetNameStringOk returns a tuple with the NameString field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameStringOk() (string, bool) { +func (o *XMLItem) GetNameStringOk() (string, bool) { if o == nil || o.NameString == nil { var ret string return ret, false @@ -232,7 +232,7 @@ func (o *XmlItem) GetNameStringOk() (string, bool) { } // HasNameString returns a boolean if a field has been set. -func (o *XmlItem) HasNameString() bool { +func (o *XMLItem) HasNameString() bool { if o != nil && o.NameString != nil { return true } @@ -241,12 +241,12 @@ func (o *XmlItem) HasNameString() bool { } // SetNameString gets a reference to the given string and assigns it to the NameString field. -func (o *XmlItem) SetNameString(v string) { +func (o *XMLItem) SetNameString(v string) { o.NameString = &v } // GetNameNumber returns the NameNumber field value if set, zero value otherwise. -func (o *XmlItem) GetNameNumber() float32 { +func (o *XMLItem) GetNameNumber() float32 { if o == nil || o.NameNumber == nil { var ret float32 return ret @@ -256,7 +256,7 @@ func (o *XmlItem) GetNameNumber() float32 { // GetNameNumberOk returns a tuple with the NameNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameNumberOk() (float32, bool) { +func (o *XMLItem) GetNameNumberOk() (float32, bool) { if o == nil || o.NameNumber == nil { var ret float32 return ret, false @@ -265,7 +265,7 @@ func (o *XmlItem) GetNameNumberOk() (float32, bool) { } // HasNameNumber returns a boolean if a field has been set. -func (o *XmlItem) HasNameNumber() bool { +func (o *XMLItem) HasNameNumber() bool { if o != nil && o.NameNumber != nil { return true } @@ -274,12 +274,12 @@ func (o *XmlItem) HasNameNumber() bool { } // SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. -func (o *XmlItem) SetNameNumber(v float32) { +func (o *XMLItem) SetNameNumber(v float32) { o.NameNumber = &v } // GetNameInteger returns the NameInteger field value if set, zero value otherwise. -func (o *XmlItem) GetNameInteger() int32 { +func (o *XMLItem) GetNameInteger() int32 { if o == nil || o.NameInteger == nil { var ret int32 return ret @@ -289,7 +289,7 @@ func (o *XmlItem) GetNameInteger() int32 { // GetNameIntegerOk returns a tuple with the NameInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameIntegerOk() (int32, bool) { +func (o *XMLItem) GetNameIntegerOk() (int32, bool) { if o == nil || o.NameInteger == nil { var ret int32 return ret, false @@ -298,7 +298,7 @@ func (o *XmlItem) GetNameIntegerOk() (int32, bool) { } // HasNameInteger returns a boolean if a field has been set. -func (o *XmlItem) HasNameInteger() bool { +func (o *XMLItem) HasNameInteger() bool { if o != nil && o.NameInteger != nil { return true } @@ -307,12 +307,12 @@ func (o *XmlItem) HasNameInteger() bool { } // SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. -func (o *XmlItem) SetNameInteger(v int32) { +func (o *XMLItem) SetNameInteger(v int32) { o.NameInteger = &v } // GetNameBoolean returns the NameBoolean field value if set, zero value otherwise. -func (o *XmlItem) GetNameBoolean() bool { +func (o *XMLItem) GetNameBoolean() bool { if o == nil || o.NameBoolean == nil { var ret bool return ret @@ -322,7 +322,7 @@ func (o *XmlItem) GetNameBoolean() bool { // GetNameBooleanOk returns a tuple with the NameBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameBooleanOk() (bool, bool) { +func (o *XMLItem) GetNameBooleanOk() (bool, bool) { if o == nil || o.NameBoolean == nil { var ret bool return ret, false @@ -331,7 +331,7 @@ func (o *XmlItem) GetNameBooleanOk() (bool, bool) { } // HasNameBoolean returns a boolean if a field has been set. -func (o *XmlItem) HasNameBoolean() bool { +func (o *XMLItem) HasNameBoolean() bool { if o != nil && o.NameBoolean != nil { return true } @@ -340,12 +340,12 @@ func (o *XmlItem) HasNameBoolean() bool { } // SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. -func (o *XmlItem) SetNameBoolean(v bool) { +func (o *XMLItem) SetNameBoolean(v bool) { o.NameBoolean = &v } // GetNameArray returns the NameArray field value if set, zero value otherwise. -func (o *XmlItem) GetNameArray() []int32 { +func (o *XMLItem) GetNameArray() []int32 { if o == nil || o.NameArray == nil { var ret []int32 return ret @@ -355,7 +355,7 @@ func (o *XmlItem) GetNameArray() []int32 { // GetNameArrayOk returns a tuple with the NameArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { +func (o *XMLItem) GetNameArrayOk() ([]int32, bool) { if o == nil || o.NameArray == nil { var ret []int32 return ret, false @@ -364,7 +364,7 @@ func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { } // HasNameArray returns a boolean if a field has been set. -func (o *XmlItem) HasNameArray() bool { +func (o *XMLItem) HasNameArray() bool { if o != nil && o.NameArray != nil { return true } @@ -373,12 +373,12 @@ func (o *XmlItem) HasNameArray() bool { } // SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. -func (o *XmlItem) SetNameArray(v []int32) { +func (o *XMLItem) SetNameArray(v []int32) { o.NameArray = &v } // GetNameWrappedArray returns the NameWrappedArray field value if set, zero value otherwise. -func (o *XmlItem) GetNameWrappedArray() []int32 { +func (o *XMLItem) GetNameWrappedArray() []int32 { if o == nil || o.NameWrappedArray == nil { var ret []int32 return ret @@ -388,7 +388,7 @@ func (o *XmlItem) GetNameWrappedArray() []int32 { // GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { +func (o *XMLItem) GetNameWrappedArrayOk() ([]int32, bool) { if o == nil || o.NameWrappedArray == nil { var ret []int32 return ret, false @@ -397,7 +397,7 @@ func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { } // HasNameWrappedArray returns a boolean if a field has been set. -func (o *XmlItem) HasNameWrappedArray() bool { +func (o *XMLItem) HasNameWrappedArray() bool { if o != nil && o.NameWrappedArray != nil { return true } @@ -406,12 +406,12 @@ func (o *XmlItem) HasNameWrappedArray() bool { } // SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. -func (o *XmlItem) SetNameWrappedArray(v []int32) { +func (o *XMLItem) SetNameWrappedArray(v []int32) { o.NameWrappedArray = &v } // GetPrefixString returns the PrefixString field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixString() string { +func (o *XMLItem) GetPrefixString() string { if o == nil || o.PrefixString == nil { var ret string return ret @@ -421,7 +421,7 @@ func (o *XmlItem) GetPrefixString() string { // GetPrefixStringOk returns a tuple with the PrefixString field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixStringOk() (string, bool) { +func (o *XMLItem) GetPrefixStringOk() (string, bool) { if o == nil || o.PrefixString == nil { var ret string return ret, false @@ -430,7 +430,7 @@ func (o *XmlItem) GetPrefixStringOk() (string, bool) { } // HasPrefixString returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixString() bool { +func (o *XMLItem) HasPrefixString() bool { if o != nil && o.PrefixString != nil { return true } @@ -439,12 +439,12 @@ func (o *XmlItem) HasPrefixString() bool { } // SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. -func (o *XmlItem) SetPrefixString(v string) { +func (o *XMLItem) SetPrefixString(v string) { o.PrefixString = &v } // GetPrefixNumber returns the PrefixNumber field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNumber() float32 { +func (o *XMLItem) GetPrefixNumber() float32 { if o == nil || o.PrefixNumber == nil { var ret float32 return ret @@ -454,7 +454,7 @@ func (o *XmlItem) GetPrefixNumber() float32 { // GetPrefixNumberOk returns a tuple with the PrefixNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { +func (o *XMLItem) GetPrefixNumberOk() (float32, bool) { if o == nil || o.PrefixNumber == nil { var ret float32 return ret, false @@ -463,7 +463,7 @@ func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { } // HasPrefixNumber returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNumber() bool { +func (o *XMLItem) HasPrefixNumber() bool { if o != nil && o.PrefixNumber != nil { return true } @@ -472,12 +472,12 @@ func (o *XmlItem) HasPrefixNumber() bool { } // SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. -func (o *XmlItem) SetPrefixNumber(v float32) { +func (o *XMLItem) SetPrefixNumber(v float32) { o.PrefixNumber = &v } // GetPrefixInteger returns the PrefixInteger field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixInteger() int32 { +func (o *XMLItem) GetPrefixInteger() int32 { if o == nil || o.PrefixInteger == nil { var ret int32 return ret @@ -487,7 +487,7 @@ func (o *XmlItem) GetPrefixInteger() int32 { // GetPrefixIntegerOk returns a tuple with the PrefixInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { +func (o *XMLItem) GetPrefixIntegerOk() (int32, bool) { if o == nil || o.PrefixInteger == nil { var ret int32 return ret, false @@ -496,7 +496,7 @@ func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { } // HasPrefixInteger returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixInteger() bool { +func (o *XMLItem) HasPrefixInteger() bool { if o != nil && o.PrefixInteger != nil { return true } @@ -505,12 +505,12 @@ func (o *XmlItem) HasPrefixInteger() bool { } // SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. -func (o *XmlItem) SetPrefixInteger(v int32) { +func (o *XMLItem) SetPrefixInteger(v int32) { o.PrefixInteger = &v } // GetPrefixBoolean returns the PrefixBoolean field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixBoolean() bool { +func (o *XMLItem) GetPrefixBoolean() bool { if o == nil || o.PrefixBoolean == nil { var ret bool return ret @@ -520,7 +520,7 @@ func (o *XmlItem) GetPrefixBoolean() bool { // GetPrefixBooleanOk returns a tuple with the PrefixBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { +func (o *XMLItem) GetPrefixBooleanOk() (bool, bool) { if o == nil || o.PrefixBoolean == nil { var ret bool return ret, false @@ -529,7 +529,7 @@ func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { } // HasPrefixBoolean returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixBoolean() bool { +func (o *XMLItem) HasPrefixBoolean() bool { if o != nil && o.PrefixBoolean != nil { return true } @@ -538,12 +538,12 @@ func (o *XmlItem) HasPrefixBoolean() bool { } // SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. -func (o *XmlItem) SetPrefixBoolean(v bool) { +func (o *XMLItem) SetPrefixBoolean(v bool) { o.PrefixBoolean = &v } // GetPrefixArray returns the PrefixArray field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixArray() []int32 { +func (o *XMLItem) GetPrefixArray() []int32 { if o == nil || o.PrefixArray == nil { var ret []int32 return ret @@ -553,7 +553,7 @@ func (o *XmlItem) GetPrefixArray() []int32 { // GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { +func (o *XMLItem) GetPrefixArrayOk() ([]int32, bool) { if o == nil || o.PrefixArray == nil { var ret []int32 return ret, false @@ -562,7 +562,7 @@ func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { } // HasPrefixArray returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixArray() bool { +func (o *XMLItem) HasPrefixArray() bool { if o != nil && o.PrefixArray != nil { return true } @@ -571,12 +571,12 @@ func (o *XmlItem) HasPrefixArray() bool { } // SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. -func (o *XmlItem) SetPrefixArray(v []int32) { +func (o *XMLItem) SetPrefixArray(v []int32) { o.PrefixArray = &v } // GetPrefixWrappedArray returns the PrefixWrappedArray field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixWrappedArray() []int32 { +func (o *XMLItem) GetPrefixWrappedArray() []int32 { if o == nil || o.PrefixWrappedArray == nil { var ret []int32 return ret @@ -586,7 +586,7 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 { // GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { +func (o *XMLItem) GetPrefixWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixWrappedArray == nil { var ret []int32 return ret, false @@ -595,7 +595,7 @@ func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { } // HasPrefixWrappedArray returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixWrappedArray() bool { +func (o *XMLItem) HasPrefixWrappedArray() bool { if o != nil && o.PrefixWrappedArray != nil { return true } @@ -604,12 +604,12 @@ func (o *XmlItem) HasPrefixWrappedArray() bool { } // SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. -func (o *XmlItem) SetPrefixWrappedArray(v []int32) { +func (o *XMLItem) SetPrefixWrappedArray(v []int32) { o.PrefixWrappedArray = &v } // GetNamespaceString returns the NamespaceString field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceString() string { +func (o *XMLItem) GetNamespaceString() string { if o == nil || o.NamespaceString == nil { var ret string return ret @@ -619,7 +619,7 @@ func (o *XmlItem) GetNamespaceString() string { // GetNamespaceStringOk returns a tuple with the NamespaceString field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceStringOk() (string, bool) { +func (o *XMLItem) GetNamespaceStringOk() (string, bool) { if o == nil || o.NamespaceString == nil { var ret string return ret, false @@ -628,7 +628,7 @@ func (o *XmlItem) GetNamespaceStringOk() (string, bool) { } // HasNamespaceString returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceString() bool { +func (o *XMLItem) HasNamespaceString() bool { if o != nil && o.NamespaceString != nil { return true } @@ -637,12 +637,12 @@ func (o *XmlItem) HasNamespaceString() bool { } // SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. -func (o *XmlItem) SetNamespaceString(v string) { +func (o *XMLItem) SetNamespaceString(v string) { o.NamespaceString = &v } // GetNamespaceNumber returns the NamespaceNumber field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceNumber() float32 { +func (o *XMLItem) GetNamespaceNumber() float32 { if o == nil || o.NamespaceNumber == nil { var ret float32 return ret @@ -652,7 +652,7 @@ func (o *XmlItem) GetNamespaceNumber() float32 { // GetNamespaceNumberOk returns a tuple with the NamespaceNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { +func (o *XMLItem) GetNamespaceNumberOk() (float32, bool) { if o == nil || o.NamespaceNumber == nil { var ret float32 return ret, false @@ -661,7 +661,7 @@ func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { } // HasNamespaceNumber returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceNumber() bool { +func (o *XMLItem) HasNamespaceNumber() bool { if o != nil && o.NamespaceNumber != nil { return true } @@ -670,12 +670,12 @@ func (o *XmlItem) HasNamespaceNumber() bool { } // SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. -func (o *XmlItem) SetNamespaceNumber(v float32) { +func (o *XMLItem) SetNamespaceNumber(v float32) { o.NamespaceNumber = &v } // GetNamespaceInteger returns the NamespaceInteger field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceInteger() int32 { +func (o *XMLItem) GetNamespaceInteger() int32 { if o == nil || o.NamespaceInteger == nil { var ret int32 return ret @@ -685,7 +685,7 @@ func (o *XmlItem) GetNamespaceInteger() int32 { // GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { +func (o *XMLItem) GetNamespaceIntegerOk() (int32, bool) { if o == nil || o.NamespaceInteger == nil { var ret int32 return ret, false @@ -694,7 +694,7 @@ func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { } // HasNamespaceInteger returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceInteger() bool { +func (o *XMLItem) HasNamespaceInteger() bool { if o != nil && o.NamespaceInteger != nil { return true } @@ -703,12 +703,12 @@ func (o *XmlItem) HasNamespaceInteger() bool { } // SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. -func (o *XmlItem) SetNamespaceInteger(v int32) { +func (o *XMLItem) SetNamespaceInteger(v int32) { o.NamespaceInteger = &v } // GetNamespaceBoolean returns the NamespaceBoolean field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceBoolean() bool { +func (o *XMLItem) GetNamespaceBoolean() bool { if o == nil || o.NamespaceBoolean == nil { var ret bool return ret @@ -718,7 +718,7 @@ func (o *XmlItem) GetNamespaceBoolean() bool { // GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { +func (o *XMLItem) GetNamespaceBooleanOk() (bool, bool) { if o == nil || o.NamespaceBoolean == nil { var ret bool return ret, false @@ -727,7 +727,7 @@ func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { } // HasNamespaceBoolean returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceBoolean() bool { +func (o *XMLItem) HasNamespaceBoolean() bool { if o != nil && o.NamespaceBoolean != nil { return true } @@ -736,12 +736,12 @@ func (o *XmlItem) HasNamespaceBoolean() bool { } // SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. -func (o *XmlItem) SetNamespaceBoolean(v bool) { +func (o *XMLItem) SetNamespaceBoolean(v bool) { o.NamespaceBoolean = &v } // GetNamespaceArray returns the NamespaceArray field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceArray() []int32 { +func (o *XMLItem) GetNamespaceArray() []int32 { if o == nil || o.NamespaceArray == nil { var ret []int32 return ret @@ -751,7 +751,7 @@ func (o *XmlItem) GetNamespaceArray() []int32 { // GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { +func (o *XMLItem) GetNamespaceArrayOk() ([]int32, bool) { if o == nil || o.NamespaceArray == nil { var ret []int32 return ret, false @@ -760,7 +760,7 @@ func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { } // HasNamespaceArray returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceArray() bool { +func (o *XMLItem) HasNamespaceArray() bool { if o != nil && o.NamespaceArray != nil { return true } @@ -769,12 +769,12 @@ func (o *XmlItem) HasNamespaceArray() bool { } // SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. -func (o *XmlItem) SetNamespaceArray(v []int32) { +func (o *XMLItem) SetNamespaceArray(v []int32) { o.NamespaceArray = &v } // GetNamespaceWrappedArray returns the NamespaceWrappedArray field value if set, zero value otherwise. -func (o *XmlItem) GetNamespaceWrappedArray() []int32 { +func (o *XMLItem) GetNamespaceWrappedArray() []int32 { if o == nil || o.NamespaceWrappedArray == nil { var ret []int32 return ret @@ -784,7 +784,7 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 { // GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { +func (o *XMLItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { if o == nil || o.NamespaceWrappedArray == nil { var ret []int32 return ret, false @@ -793,7 +793,7 @@ func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { } // HasNamespaceWrappedArray returns a boolean if a field has been set. -func (o *XmlItem) HasNamespaceWrappedArray() bool { +func (o *XMLItem) HasNamespaceWrappedArray() bool { if o != nil && o.NamespaceWrappedArray != nil { return true } @@ -802,12 +802,12 @@ func (o *XmlItem) HasNamespaceWrappedArray() bool { } // SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. -func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { +func (o *XMLItem) SetNamespaceWrappedArray(v []int32) { o.NamespaceWrappedArray = &v } // GetPrefixNsString returns the PrefixNsString field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsString() string { +func (o *XMLItem) GetPrefixNsString() string { if o == nil || o.PrefixNsString == nil { var ret string return ret @@ -817,7 +817,7 @@ func (o *XmlItem) GetPrefixNsString() string { // GetPrefixNsStringOk returns a tuple with the PrefixNsString field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { +func (o *XMLItem) GetPrefixNsStringOk() (string, bool) { if o == nil || o.PrefixNsString == nil { var ret string return ret, false @@ -826,7 +826,7 @@ func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { } // HasPrefixNsString returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsString() bool { +func (o *XMLItem) HasPrefixNsString() bool { if o != nil && o.PrefixNsString != nil { return true } @@ -835,12 +835,12 @@ func (o *XmlItem) HasPrefixNsString() bool { } // SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. -func (o *XmlItem) SetPrefixNsString(v string) { +func (o *XMLItem) SetPrefixNsString(v string) { o.PrefixNsString = &v } // GetPrefixNsNumber returns the PrefixNsNumber field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsNumber() float32 { +func (o *XMLItem) GetPrefixNsNumber() float32 { if o == nil || o.PrefixNsNumber == nil { var ret float32 return ret @@ -850,7 +850,7 @@ func (o *XmlItem) GetPrefixNsNumber() float32 { // GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { +func (o *XMLItem) GetPrefixNsNumberOk() (float32, bool) { if o == nil || o.PrefixNsNumber == nil { var ret float32 return ret, false @@ -859,7 +859,7 @@ func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { } // HasPrefixNsNumber returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsNumber() bool { +func (o *XMLItem) HasPrefixNsNumber() bool { if o != nil && o.PrefixNsNumber != nil { return true } @@ -868,12 +868,12 @@ func (o *XmlItem) HasPrefixNsNumber() bool { } // SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. -func (o *XmlItem) SetPrefixNsNumber(v float32) { +func (o *XMLItem) SetPrefixNsNumber(v float32) { o.PrefixNsNumber = &v } // GetPrefixNsInteger returns the PrefixNsInteger field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsInteger() int32 { +func (o *XMLItem) GetPrefixNsInteger() int32 { if o == nil || o.PrefixNsInteger == nil { var ret int32 return ret @@ -883,7 +883,7 @@ func (o *XmlItem) GetPrefixNsInteger() int32 { // GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { +func (o *XMLItem) GetPrefixNsIntegerOk() (int32, bool) { if o == nil || o.PrefixNsInteger == nil { var ret int32 return ret, false @@ -892,7 +892,7 @@ func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { } // HasPrefixNsInteger returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsInteger() bool { +func (o *XMLItem) HasPrefixNsInteger() bool { if o != nil && o.PrefixNsInteger != nil { return true } @@ -901,12 +901,12 @@ func (o *XmlItem) HasPrefixNsInteger() bool { } // SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. -func (o *XmlItem) SetPrefixNsInteger(v int32) { +func (o *XMLItem) SetPrefixNsInteger(v int32) { o.PrefixNsInteger = &v } // GetPrefixNsBoolean returns the PrefixNsBoolean field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsBoolean() bool { +func (o *XMLItem) GetPrefixNsBoolean() bool { if o == nil || o.PrefixNsBoolean == nil { var ret bool return ret @@ -916,7 +916,7 @@ func (o *XmlItem) GetPrefixNsBoolean() bool { // GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { +func (o *XMLItem) GetPrefixNsBooleanOk() (bool, bool) { if o == nil || o.PrefixNsBoolean == nil { var ret bool return ret, false @@ -925,7 +925,7 @@ func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { } // HasPrefixNsBoolean returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsBoolean() bool { +func (o *XMLItem) HasPrefixNsBoolean() bool { if o != nil && o.PrefixNsBoolean != nil { return true } @@ -934,12 +934,12 @@ func (o *XmlItem) HasPrefixNsBoolean() bool { } // SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. -func (o *XmlItem) SetPrefixNsBoolean(v bool) { +func (o *XMLItem) SetPrefixNsBoolean(v bool) { o.PrefixNsBoolean = &v } // GetPrefixNsArray returns the PrefixNsArray field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsArray() []int32 { +func (o *XMLItem) GetPrefixNsArray() []int32 { if o == nil || o.PrefixNsArray == nil { var ret []int32 return ret @@ -949,7 +949,7 @@ func (o *XmlItem) GetPrefixNsArray() []int32 { // GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { +func (o *XMLItem) GetPrefixNsArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsArray == nil { var ret []int32 return ret, false @@ -958,7 +958,7 @@ func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { } // HasPrefixNsArray returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsArray() bool { +func (o *XMLItem) HasPrefixNsArray() bool { if o != nil && o.PrefixNsArray != nil { return true } @@ -967,12 +967,12 @@ func (o *XmlItem) HasPrefixNsArray() bool { } // SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. -func (o *XmlItem) SetPrefixNsArray(v []int32) { +func (o *XMLItem) SetPrefixNsArray(v []int32) { o.PrefixNsArray = &v } // GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field value if set, zero value otherwise. -func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { +func (o *XMLItem) GetPrefixNsWrappedArray() []int32 { if o == nil || o.PrefixNsWrappedArray == nil { var ret []int32 return ret @@ -982,7 +982,7 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { // GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { +func (o *XMLItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsWrappedArray == nil { var ret []int32 return ret, false @@ -991,7 +991,7 @@ func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { } // HasPrefixNsWrappedArray returns a boolean if a field has been set. -func (o *XmlItem) HasPrefixNsWrappedArray() bool { +func (o *XMLItem) HasPrefixNsWrappedArray() bool { if o != nil && o.PrefixNsWrappedArray != nil { return true } @@ -1000,16 +1000,16 @@ func (o *XmlItem) HasPrefixNsWrappedArray() bool { } // SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. -func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { +func (o *XMLItem) SetPrefixNsWrappedArray(v []int32) { o.PrefixNsWrappedArray = &v } -type NullableXmlItem struct { - Value XmlItem +type NullableXMLItem struct { + Value XMLItem ExplicitNull bool } -func (v NullableXmlItem) MarshalJSON() ([]byte, error) { +func (v NullableXMLItem) MarshalJSON() ([]byte, error) { switch { case v.ExplicitNull: return []byte("null"), nil @@ -1018,7 +1018,7 @@ func (v NullableXmlItem) MarshalJSON() ([]byte, error) { } } -func (v *NullableXmlItem) UnmarshalJSON(src []byte) error { +func (v *NullableXMLItem) UnmarshalJSON(src []byte) error { if bytes.Equal(src, []byte("null")) { v.ExplicitNull = true return nil diff --git a/samples/client/petstore/go-experimental/go-petstore/response.go b/samples/client/petstore/go-experimental/go-petstore/response.go index c16f181f4e94..92715549d9ef 100644 --- a/samples/client/petstore/go-experimental/go-petstore/response.go +++ b/samples/client/petstore/go-experimental/go-petstore/response.go @@ -13,8 +13,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -31,16 +31,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new APIResonse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go index 847aa517af19..f7c79efabf74 100644 --- a/samples/client/petstore/go-experimental/pet_api_test.go +++ b/samples/client/petstore/go-experimental/pet_api_test.go @@ -28,11 +28,11 @@ func TestMain(m *testing.M) { } func TestAddPet(t *testing.T) { - newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) + newPet := (sw.Pet{ID: sw.PtrInt64(12830), Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: &[]sw.Tag{sw.Tag{ID: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -43,7 +43,7 @@ func TestAddPet(t *testing.T) { } func TestFindPetsByStatusWithMissingParam(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err) @@ -53,12 +53,12 @@ func TestFindPetsByStatusWithMissingParam(t *testing.T) { } } -func TestGetPetById(t *testing.T) { +func TestGetPetByID(t *testing.T) { isPetCorrect(t, 12830, "gopher", "pending") } -func TestGetPetByIdWithInvalidID(t *testing.T) { - resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999) +func TestGetPetByIDWithInvalidID(t *testing.T) { + resp, r, err := client.PetAPI.GetPetByID(context.Background(), 999999999) if r != nil && r.StatusCode == 404 { assertedError, ok := err.(sw.GenericOpenAPIError) a := assert.New(t) @@ -75,7 +75,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) { } func TestUpdatePetWithForm(t *testing.T) { - r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830, &sw.UpdatePetWithFormOpts{ + r, err := client.PetAPI.UpdatePetWithForm(context.Background(), 12830, &sw.UpdatePetWithFormOpts{ Name: optional.NewString("golang"), Status: optional.NewString("available"), }) @@ -93,7 +93,7 @@ func TestUpdatePetWithForm(t *testing.T) { func TestFindPetsByTag(t *testing.T) { var found = false - resp, r, err := client.PetApi.FindPetsByTags(context.Background(), []string{"tag2"}) + resp, r, err := client.PetAPI.FindPetsByTags(context.Background(), []string{"tag2"}) if err != nil { t.Fatalf("Error while getting pet by tag: %v", err) t.Log(r) @@ -104,7 +104,7 @@ func TestFindPetsByTag(t *testing.T) { assert := assert.New(t) for i := 0; i < len(resp); i++ { - if *resp[i].Id == 12830 { + if *resp[i].ID == 12830 { assert.Equal(*resp[i].Status, "available", "Pet status should be `pending`") found = true } @@ -122,7 +122,7 @@ func TestFindPetsByTag(t *testing.T) { } func TestFindPetsByStatus(t *testing.T) { - resp, r, err := client.PetApi.FindPetsByStatus(context.Background(), []string{"available"}) + resp, r, err := client.PetAPI.FindPetsByStatus(context.Background(), []string{"available"}) if err != nil { t.Fatalf("Error while getting pet by id: %v", err) t.Log(r) @@ -145,7 +145,7 @@ func TestFindPetsByStatus(t *testing.T) { func TestUploadFile(t *testing.T) { file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFile(context.Background(), 12830, &sw.UploadFileOpts{ + _, r, err := client.PetAPI.UploadFile(context.Background(), 12830, &sw.UploadFileOpts{ AdditionalMetadata: optional.NewString("golang"), File: optional.NewInterface(file), }) @@ -163,7 +163,7 @@ func TestUploadFileRequired(t *testing.T) { return // remove when server supports this endpoint file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830, + _, r, err := client.PetAPI.UploadFileWithRequiredFile(context.Background(), 12830, file, &sw.UploadFileWithRequiredFileOpts{ AdditionalMetadata: optional.NewString("golang"), @@ -179,7 +179,7 @@ func TestUploadFileRequired(t *testing.T) { } func TestDeletePet(t *testing.T) { - r, err := client.PetApi.DeletePet(context.Background(), 12830, nil) + r, err := client.PetAPI.DeletePet(context.Background(), 12830, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -195,19 +195,19 @@ func TestConcurrency(t *testing.T) { errc := make(chan error) newPets := []sw.Pet{ - sw.Pet{Id: 912345, Name: "gopherFred", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912346, Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, - sw.Pet{Id: 912347, Name: "gopherRick", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "mia"}, - sw.Pet{Id: 912348, Name: "gopherJohn", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, - sw.Pet{Id: 912349, Name: "gopherAlf", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912350, Name: "gopherRob", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912351, Name: "gopherIan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912345, Name: "gopherFred", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912346, Name: "gopherDan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912347, Name: "gopherRick", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "mia"}, + sw.Pet{ID: 912348, Name: "gopherJohn", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912349, Name: "gopherAlf", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912350, Name: "gopherRob", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912351, Name: "gopherIan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, } // Add the pets. for _, pet := range newPets { go func(newPet sw.Pet) { - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if r.StatusCode != 200 { t.Log(r) } @@ -219,7 +219,7 @@ func TestConcurrency(t *testing.T) { // Verify they are correct. for _, pet := range newPets { go func(pet sw.Pet) { - isPetCorrect(t, pet.Id, pet.Name, pet.Status) + isPetCorrect(t, pet.ID, pet.Name, pet.Status) errc <- nil }(pet) } @@ -229,19 +229,19 @@ func TestConcurrency(t *testing.T) { // Update all to active with the name gopherDan for _, pet := range newPets { go func(id int64) { - r, err := client.PetApi.UpdatePet(nil, sw.Pet{Id: (int64)(id), Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}) + r, err := client.PetAPI.UpdatePet(nil, sw.Pet{ID: (int64)(id), Name: "gopherDan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}) if r.StatusCode != 200 { t.Log(r) } errc <- err - }(pet.Id) + }(pet.ID) } waitOnFunctions(t, errc, len(newPets)) // Verify they are correct. for _, pet := range newPets { go func(pet sw.Pet) { - isPetCorrect(t, pet.Id, "gopherDan", "active") + isPetCorrect(t, pet.ID, "gopherDan", "active") errc <- nil }(pet) } @@ -253,7 +253,7 @@ func TestConcurrency(t *testing.T) { go func(id int64) { deletePet(t, (int64)(id)) errc <- nil - }(pet.Id) + }(pet.ID) } waitOnFunctions(t, errc, len(newPets)) } @@ -269,7 +269,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) { } func deletePet(t *testing.T, id int64) { - r, err := client.PetApi.DeletePet(context.Background(), id, nil) + r, err := client.PetAPI.DeletePet(context.Background(), id, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -281,11 +281,11 @@ func deletePet(t *testing.T, id int64) { func isPetCorrect(t *testing.T, id int64, name string, status string) { assert := assert.New(t) - resp, r, err := client.PetApi.GetPetById(context.Background(), id) + resp, r, err := client.PetAPI.GetPetByID(context.Background(), id) if err != nil { t.Fatalf("Error while getting pet by id: %v", err) } else { - assert.Equal(*resp.Id, int64(id), "Pet id should be equal") + assert.Equal(*resp.ID, int64(id), "Pet id should be equal") assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) assert.Equal(*resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) diff --git a/samples/client/petstore/go-experimental/store_api_test.go b/samples/client/petstore/go-experimental/store_api_test.go index 81f4fd7e33d9..41ec63c7bac7 100644 --- a/samples/client/petstore/go-experimental/store_api_test.go +++ b/samples/client/petstore/go-experimental/store_api_test.go @@ -11,14 +11,14 @@ import ( func TestPlaceOrder(t *testing.T) { newOrder := sw.Order{ - Id: sw.PtrInt64(0), - PetId: sw.PtrInt64(0), + ID: sw.PtrInt64(0), + PetID: sw.PtrInt64(0), Quantity: sw.PtrInt32(0), ShipDate: sw.PtrTime(time.Now().UTC()), Status: sw.PtrString("placed"), Complete: sw.PtrBool(false)} - _, r, err := client.StoreApi.PlaceOrder(context.Background(), newOrder) + _, r, err := client.StoreAPI.PlaceOrder(context.Background(), newOrder) if err != nil { // Skip parsing time error due to error in Petstore Test Server diff --git a/samples/client/petstore/go-experimental/user_api_test.go b/samples/client/petstore/go-experimental/user_api_test.go index 882608702097..c6443b701473 100644 --- a/samples/client/petstore/go-experimental/user_api_test.go +++ b/samples/client/petstore/go-experimental/user_api_test.go @@ -11,7 +11,7 @@ import ( func TestCreateUser(t *testing.T) { newUser := sw.User{ - Id: sw.PtrInt64(1000), + ID: sw.PtrInt64(1000), FirstName: sw.PtrString("gopher"), LastName: sw.PtrString("lang"), Username: sw.PtrString("gopher"), @@ -20,7 +20,7 @@ func TestCreateUser(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1)} - apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser) + apiResponse, err := client.UserAPI.CreateUser(context.Background(), newUser) if err != nil { t.Fatalf("Error while adding user: %v", err) @@ -34,7 +34,7 @@ func TestCreateUser(t *testing.T) { func TestCreateUsersWithArrayInput(t *testing.T) { newUsers := []sw.User{ sw.User{ - Id: sw.PtrInt64(1001), + ID: sw.PtrInt64(1001), FirstName: sw.PtrString("gopher1"), LastName: sw.PtrString("lang1"), Username: sw.PtrString("gopher1"), @@ -44,7 +44,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { UserStatus: sw.PtrInt32(1), }, sw.User{ - Id: sw.PtrInt64(1002), + ID: sw.PtrInt64(1002), FirstName: sw.PtrString("gopher2"), LastName: sw.PtrString("lang2"), Username: sw.PtrString("gopher2"), @@ -55,7 +55,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { }, } - apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background(), newUsers) + apiResponse, err := client.UserAPI.CreateUsersWithArrayInput(context.Background(), newUsers) if err != nil { t.Fatalf("Error while adding users: %v", err) } @@ -64,13 +64,13 @@ func TestCreateUsersWithArrayInput(t *testing.T) { } //tear down - _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1") + _, err1 := client.UserAPI.DeleteUser(context.Background(), "gopher1") if err1 != nil { t.Errorf("Error while deleting user") t.Log(err1) } - _, err2 := client.UserApi.DeleteUser(context.Background(), "gopher2") + _, err2 := client.UserAPI.DeleteUser(context.Background(), "gopher2") if err2 != nil { t.Errorf("Error while deleting user") t.Log(err2) @@ -80,11 +80,11 @@ func TestCreateUsersWithArrayInput(t *testing.T) { func TestGetUserByName(t *testing.T) { assert := assert.New(t) - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher") if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(*resp.Id, int64(1000), "User id should be equal") + assert.Equal(*resp.ID, int64(1000), "User id should be equal") assert.Equal(*resp.Username, "gopher", "User name should be gopher") assert.Equal(*resp.LastName, "lang", "Last name should be lang") //t.Log(resp) @@ -95,7 +95,7 @@ func TestGetUserByName(t *testing.T) { } func TestGetUserByNameWithInvalidID(t *testing.T) { - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "999999999") if apiResponse != nil && apiResponse.StatusCode == 404 { return // This is a pass condition. API will return with a 404 error. } else if err != nil { @@ -113,7 +113,7 @@ func TestUpdateUser(t *testing.T) { assert := assert.New(t) newUser := sw.User{ - Id: sw.PtrInt64(1000), + ID: sw.PtrInt64(1000), FirstName: sw.PtrString("gopher20"), LastName: sw.PtrString("lang20"), Username: sw.PtrString("gopher"), @@ -122,7 +122,7 @@ func TestUpdateUser(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1)} - apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser) + apiResponse, err := client.UserAPI.UpdateUser(context.Background(), "gopher", newUser) if err != nil { t.Fatalf("Error while deleting user by id: %v", err) } @@ -131,18 +131,18 @@ func TestUpdateUser(t *testing.T) { } //verify changings are correct - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher") if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(*resp.Id, int64(1000), "User id should be equal") + assert.Equal(*resp.ID, int64(1000), "User id should be equal") assert.Equal(*resp.FirstName, "gopher20", "User name should be gopher") assert.Equal(*resp.Password, "lang", "User name should be the same") } } func TestDeleteUser(t *testing.T) { - apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher") + apiResponse, err := client.UserAPI.DeleteUser(context.Background(), "gopher") if err != nil { t.Fatalf("Error while deleting user: %v", err) diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go index 5f817703a886..be5c17ec8d9b 100644 --- a/samples/client/petstore/go/auth_test.go +++ b/samples/client/petstore/go/auth_test.go @@ -37,10 +37,10 @@ func TestOAuth2(t *testing.T) { tokenSource := cfg.TokenSource(createContext(nil), &tok) auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -49,7 +49,7 @@ func TestOAuth2(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -71,10 +71,10 @@ func TestBasicAuth(t *testing.T) { Password: "f4k3p455", }) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(auth, newPet) + r, err := client.PetAPI.AddPet(auth, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -83,7 +83,7 @@ func TestBasicAuth(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -100,10 +100,10 @@ func TestBasicAuth(t *testing.T) { func TestAccessToken(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -112,7 +112,7 @@ func TestAccessToken(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -129,10 +129,10 @@ func TestAccessToken(t *testing.T) { func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123"}) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -141,7 +141,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetAPI.GetPetByID(auth, 12992) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -151,7 +151,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -163,10 +163,10 @@ func TestAPIKeyNoPrefix(t *testing.T) { func TestAPIKeyWithPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123", Prefix: "Bearer"}) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -175,7 +175,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetAPI.GetPetByID(auth, 12992) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -185,7 +185,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetAPI.DeletePet(auth, 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -196,10 +196,10 @@ func TestAPIKeyWithPrefix(t *testing.T) { func TestDefaultHeader(t *testing.T) { - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12992, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -208,7 +208,7 @@ func TestDefaultHeader(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(context.Background(), 12992, nil) + r, err = client.PetAPI.DeletePet(context.Background(), 12992, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -223,7 +223,7 @@ func TestDefaultHeader(t *testing.T) { } func TestHostOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while finding pets by status: %v", err) @@ -235,7 +235,7 @@ func TestHostOverride(t *testing.T) { } func TestSchemeOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while finding pets by status: %v", err) diff --git a/samples/client/petstore/go/fake_api_test.go b/samples/client/petstore/go/fake_api_test.go index f4242b5048c0..2e1adeb36fc8 100644 --- a/samples/client/petstore/go/fake_api_test.go +++ b/samples/client/petstore/go/fake_api_test.go @@ -17,7 +17,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { File: sw.File{SourceURI: "https://example.com/image.png"}, Files: []sw.File{{SourceURI: "https://example.com/image.png"}}} - r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema) + r, err := client.FakeAPI.TestBodyWithFileSchema(context.Background(), schema) if err != nil { t.Fatalf("Error while adding pet: %v", err) diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index b4fd0109ce2e..76a06848781c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -32,47 +32,48 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user +*AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*FakeAPI* | [**CreateXMLItem**](docs/FakeAPI.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem +*FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**TestJSONFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store +*PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**GetPetByID**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet +*PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**GetOrderByID**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user +*UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system +*UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user ## Documentation For Models + - [APIResponse](docs/APIResponse.md) - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) @@ -82,7 +83,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [Animal](docs/Animal.md) - - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) @@ -120,7 +120,7 @@ Class | Method | HTTP request | Description - [TypeHolderDefault](docs/TypeHolderDefault.md) - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) + - [XMLItem](docs/XMLItem.md) ## Documentation For Authorization diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go index dbb36217de0d..96e6fd1472b9 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// AnotherFakeApiService AnotherFakeApi service -type AnotherFakeApiService service +// AnotherFakeAPIService AnotherFakeAPI service +type AnotherFakeAPIService service /* Call123TestSpecialTags To test special tags @@ -32,7 +32,7 @@ To test special tags and operation ID starting with number * @param body client model @return Client */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index 42920dcf0408..66203704d876 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -25,16 +25,16 @@ var ( _ _context.Context ) -// FakeApiService FakeApi service -type FakeApiService service +// FakeAPIService FakeAPI service +type FakeAPIService service /* -CreateXmlItem creates an XmlItem +CreateXMLItem creates an XmlItem this route creates an XmlItem * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param xmlItem XmlItem Body + * @param xMLItem XmlItem Body */ -func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) { +func (a *FakeAPIService) CreateXMLItem(ctx _context.Context, xMLItem XMLItem) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -67,7 +67,7 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &xmlItem + localVarPostBody = &xMLItem r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err @@ -108,7 +108,7 @@ Test serialization of outer boolean types * @param "Body" (optional.Bool) - Input boolean as post body @return bool */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -204,7 +204,7 @@ Test serialization of object with outer number type * @param "Body" (optional.Interface of OuterComposite) - Input composite as post body @return OuterComposite */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -304,7 +304,7 @@ Test serialization of outer number types * @param "Body" (optional.Float32) - Input number as post body @return float32 */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -400,7 +400,7 @@ Test serialization of outer string types * @param "Body" (optional.String) - Input string as post body @return string */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -489,7 +489,7 @@ For this test, the body for this request much reference a schema named `Fil * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -556,7 +556,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param query * @param body */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -625,7 +625,7 @@ To test \"client\" model * @param body client model @return Client */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeAPIService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -739,7 +739,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン * @param "Password" (optional.String) - None * @param "Callback" (optional.String) - None */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -882,7 +882,7 @@ To test enum parameters * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) * @param "EnumFormString" (optional.String) - Form parameter enum test (string) */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -984,7 +984,7 @@ Fake endpoint to test group parameters (optional) * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters * @param "Int64Group" (optional.Int64) - Integer in group parameters */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1060,7 +1060,7 @@ TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param request body */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -1122,12 +1122,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa } /* -TestJsonFormData test json serialization of form data +TestJSONFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param field1 * @param param2 field2 */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestJSONFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1194,11 +1194,11 @@ To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pipe * @param ioutil - * @param http - * @param url + * @param hTTP + * @param uRL * @param context */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -1215,8 +1215,8 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarQueryParams.Add("pipe", parameterToString(pipe, "csv")) localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) + localVarQueryParams.Add("http", parameterToString(hTTP, "space")) + localVarQueryParams.Add("url", parameterToString(uRL, "csv")) t:=context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go index b02c47d4c9d4..2c650af3730f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// FakeClassnameTags123ApiService FakeClassnameTags123Api service -type FakeClassnameTags123ApiService service +// FakeClassnameTags123APIService FakeClassnameTags123API service +type FakeClassnameTags123APIService service /* TestClassname To test class name in snake case @@ -32,7 +32,7 @@ To test class name in snake case * @param body client model @return Client */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123APIService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 20a6c92965b6..8ccabd0e591f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -25,15 +25,15 @@ var ( _ _context.Context ) -// PetApiService PetApi service -type PetApiService service +// PetAPIService PetAPI service +type PetAPIService service /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -96,17 +96,17 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon // DeletePetOpts Optional parameters for the method 'DeletePet' type DeletePetOpts struct { - ApiKey optional.String + APIKey optional.String } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId Pet id to delete + * @param petID Pet id to delete * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - + * @param "APIKey" (optional.String) - */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) DeletePet(ctx _context.Context, petID int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -117,7 +117,7 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -140,8 +140,8 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if localVarOptionals != nil && localVarOptionals.APIKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.APIKey.Value(), "") } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { @@ -177,7 +177,7 @@ Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter @return []Pet */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -264,7 +264,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 * @param tags Tags to filter by @return []Pet */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -345,13 +345,13 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } /* -GetPetById Find pet by ID +GetPetByID Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to return + * @param petID ID of pet to return @return Pet */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetAPIService) GetPetByID(ctx _context.Context, petID int64) (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -363,7 +363,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -449,7 +449,7 @@ UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -519,12 +519,12 @@ type UpdatePetWithFormOpts struct { /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet that needs to be updated + * @param petID ID of pet that needs to be updated * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: * @param "Name" (optional.String) - Updated name of the pet * @param "Status" (optional.String) - Updated status of the pet */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePetWithForm(ctx _context.Context, petID int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -535,7 +535,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -600,25 +600,25 @@ type UploadFileOpts struct { /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param optional nil or *UploadFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFile(ctx _context.Context, petID int64, localVarOptionals *UploadFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -681,7 +681,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -712,25 +712,25 @@ type UploadFileWithRequiredFileOpts struct { /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFileWithRequiredFile(ctx _context.Context, petID int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -786,7 +786,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go index 47faea8586b1..b60d7621b2d8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_store.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go @@ -23,16 +23,16 @@ var ( _ _context.Context ) -// StoreApiService StoreApi service -type StoreApiService service +// StoreAPIService StoreAPI service +type StoreAPIService service /* DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of the order that needs to be deleted + * @param orderID ID of the order that needs to be deleted */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreAPIService) DeleteOrder(ctx _context.Context, orderID string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -43,7 +43,7 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -99,7 +99,7 @@ Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return map[string]int32 */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreAPIService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -190,13 +190,13 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } /* -GetOrderById Find purchase order by ID +GetOrderByID Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of pet that needs to be fetched + * @param orderID ID of pet that needs to be fetched @return Order */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) GetOrderByID(ctx _context.Context, orderID int64) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -208,16 +208,16 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { - return localVarReturnValue, nil, reportError("orderId must be greater than 1") + if orderID < 1 { + return localVarReturnValue, nil, reportError("orderID must be greater than 1") } - if orderId > 5 { - return localVarReturnValue, nil, reportError("orderId must be less than 5") + if orderID > 5 { + return localVarReturnValue, nil, reportError("orderID must be less than 5") } // to determine the Content-Type header @@ -289,7 +289,7 @@ PlaceOrder Place an order for a pet * @param body order placed for purchasing the pet @return Order */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go index 56bd4d3fc193..a5af61c17560 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go @@ -23,8 +23,8 @@ var ( _ _context.Context ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service /* CreateUser Create user @@ -32,7 +32,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Created user object */ -func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -98,7 +98,7 @@ CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -164,7 +164,7 @@ CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -231,7 +231,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserAPIService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -298,7 +298,7 @@ GetUserByName Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @return User */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserAPIService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -386,7 +386,7 @@ LoginUser Logs user into the system * @param password The password for login in clear text @return string */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserAPIService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -471,7 +471,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserAPIService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -537,7 +537,7 @@ This can only be done by the logged in user. * @param username name that need to be deleted * @param body Updated user object */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index 5a5a4c852939..db5e03054435 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -48,17 +48,17 @@ type APIClient struct { // API Services - AnotherFakeApi *AnotherFakeApiService + AnotherFakeAPI *AnotherFakeAPIService - FakeApi *FakeApiService + FakeAPI *FakeAPIService - FakeClassnameTags123Api *FakeClassnameTags123ApiService + FakeClassnameTags123API *FakeClassnameTags123APIService - PetApi *PetApiService + PetAPI *PetAPIService - StoreApi *StoreApiService + StoreAPI *StoreAPIService - UserApi *UserApiService + UserAPI *UserAPIService } type service struct { @@ -77,12 +77,12 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) - c.FakeApi = (*FakeApiService)(&c.common) - c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) - c.PetApi = (*PetApiService)(&c.common) - c.StoreApi = (*StoreApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) + c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common) + c.FakeAPI = (*FakeAPIService)(&c.common) + c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common) + c.PetAPI = (*PetAPIService)(&c.common) + c.StoreAPI = (*StoreAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) return c } diff --git a/samples/client/petstore/go/go-petstore-withXml/configuration.go b/samples/client/petstore/go/go-petstore-withXml/configuration.go index fbebb230db34..d8131e86fc5e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/configuration.go +++ b/samples/client/petstore/go/go-petstore-withXml/configuration.go @@ -63,7 +63,7 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - Url string + URL string Description string Variables map[string]ServerVariable } @@ -89,7 +89,7 @@ func NewConfiguration() *Configuration { Debug: false, Servers: []ServerConfiguration{ { - Url: "http://petstore.swagger.io:80/v2", + URL: "http://petstore.swagger.io:80/v2", Description: "No description provided", }, }, @@ -102,13 +102,13 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } -// ServerUrl returns URL based on server settings -func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) { +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { if index < 0 || len(c.Servers) <= index { return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) } server := c.Servers[index] - url := server.Url + url := server.URL // go through variables and replace placeholders for name, variable := range server.Variables { diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore-withXml/docs/APIResponse.md similarity index 96% rename from samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md rename to samples/client/petstore/go/go-petstore-withXml/docs/APIResponse.md index 41d28fb578c1..7e1e5e951772 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/APIResponse.md @@ -1,4 +1,4 @@ -# ApiResponse +# APIResponse ## Properties diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md rename to samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeAPI.md index 2c22f8f1b307..369a45ce0faa 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeAPI.md @@ -1,10 +1,10 @@ -# \AnotherFakeApi +# \AnotherFakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags +[**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md index 01e8344bd06f..114e95fb79d6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [default to default-name] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeAPI.md similarity index 92% rename from samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md rename to samples/client/petstore/go/go-petstore-withXml/docs/FakeAPI.md index 1d85fdf9d313..ac1757e9cf15 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeAPI.md @@ -1,29 +1,29 @@ -# \FakeApi +# \FakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#CreateXmlItem) | **Post** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | +[**CreateXMLItem**](FakeAPI.md#CreateXMLItem) | **Post** /fake/create_xml_item | creates an XmlItem +[**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJSONFormData**](FakeAPI.md#TestJSONFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | -## CreateXmlItem +## CreateXMLItem -> CreateXmlItem(ctx, xmlItem) +> CreateXMLItem(ctx, xMLItem) creates an XmlItem @@ -35,7 +35,7 @@ this route creates an XmlItem Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +**xMLItem** | [**XMLItem**](XMLItem.md)| XmlItem Body | ### Return type @@ -521,9 +521,9 @@ No authorization required [[Back to README]](../README.md) -## TestJsonFormData +## TestJSONFormData -> TestJsonFormData(ctx, param, param2) +> TestJSONFormData(ctx, param, param2) test json serialization of form data @@ -556,7 +556,7 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, hTTP, uRL, context) @@ -570,8 +570,8 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **pipe** | [**[]string**](string.md)| | **ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | +**hTTP** | [**[]string**](string.md)| | +**uRL** | [**[]string**](string.md)| | **context** | [**[]string**](string.md)| | ### Return type diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123API.md similarity index 91% rename from samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md rename to samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123API.md index 224542b70517..66bf7bd6ec03 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123API.md @@ -1,10 +1,10 @@ -# \FakeClassnameTags123Api +# \FakeClassnameTags123API All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case +[**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md index 4e8c3332b639..04f83ed9c9f9 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Binary** | [***os.File**](*os.File.md) | | [optional] **Date** | **string** | | **DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **Password** | **string** | | **BigDecimal** | **float64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md index a2ce1068b279..ae9b002443ec 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **DateTime** | [**time.Time**](time.Time.md) | | [optional] **Map** | [**map[string]Animal**](Animal.md) | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md index eeef0971005e..e19ca331fff8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**PetId** | **int64** | | [optional] +**ID** | **int64** | | [optional] +**PetID** | **int64** | | [optional] **Quantity** | **int32** | | [optional] **ShipDate** | [**time.Time**](time.Time.md) | | [optional] **Status** | **string** | Order Status | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md index c48104c63971..86d128857312 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Category** | [**Category**](Category.md) | | [optional] **Name** | **string** | | -**PhotoUrls** | **[]string** | | +**PhotoURLs** | **[]string** | | **Tags** | [**[]Tag**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetAPI.md similarity index 88% rename from samples/client/petstore/go/go-petstore/docs/PetApi.md rename to samples/client/petstore/go/go-petstore-withXml/docs/PetAPI.md index 6ee9afef754b..91282f7096f2 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetAPI.md @@ -1,18 +1,18 @@ -# \PetApi +# \PetAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetByID**](PetAPI.md#GetPetByID) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) @@ -50,7 +50,7 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petID, optional) Deletes a pet @@ -60,7 +60,7 @@ Deletes a pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | +**petID** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a pointer to a DeletePetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **aPIKey** | **optional.String**| | ### Return type @@ -159,9 +159,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPetById +## GetPetByID -> Pet GetPetById(ctx, petId) +> Pet GetPetByID(ctx, petID) Find pet by ID @@ -173,7 +173,7 @@ Returns a single pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petID** | **int64**| ID of pet to return | ### Return type @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petID, optional) Updates a pet in the store with form data @@ -237,7 +237,7 @@ Updates a pet in the store with form data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | +**petID** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> APIResponse UploadFile(ctx, petID, optional) uploads an image @@ -281,7 +281,7 @@ uploads an image Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -297,7 +297,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> APIResponse UploadFileWithRequiredFile(ctx, petID, requiredFile, optional) uploads an image (required) @@ -325,7 +325,7 @@ uploads an image (required) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters @@ -342,7 +342,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/StoreAPI.md similarity index 86% rename from samples/client/petstore/go/go-petstore/docs/StoreApi.md rename to samples/client/petstore/go/go-petstore-withXml/docs/StoreAPI.md index 531ab09ff688..569c1c55ca34 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/StoreAPI.md @@ -1,19 +1,19 @@ -# \StoreApi +# \StoreAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet +[**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderByID**](StoreAPI.md#GetOrderByID) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderID) Delete purchase order by ID @@ -25,7 +25,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderID** | **string**| ID of the order that needs to be deleted | ### Return type @@ -75,9 +75,9 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) -## GetOrderById +## GetOrderByID -> Order GetOrderById(ctx, orderId) +> Order GetOrderByID(ctx, orderID) Find purchase order by ID @@ -89,7 +89,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderID** | **int64**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md index d6b3cc117b52..c22cd1ed1c97 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/User.md b/samples/client/petstore/go/go-petstore-withXml/docs/User.md index 7675d7ff701b..d89e52efe79c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/User.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Username** | **string** | | [optional] **FirstName** | **string** | | [optional] **LastName** | **string** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md rename to samples/client/petstore/go/go-petstore-withXml/docs/UserAPI.md index d9f16bb5fb0e..549b3eb6c273 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserAPI.md @@ -1,17 +1,17 @@ -# \UserApi +# \UserAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md b/samples/client/petstore/go/go-petstore-withXml/docs/XMLItem.md similarity index 99% rename from samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md rename to samples/client/petstore/go/go-petstore-withXml/docs/XMLItem.md index 8a9c2dc0b504..fc3a0c85f15a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/XMLItem.md @@ -1,4 +1,4 @@ -# XmlItem +# XMLItem ## Properties diff --git a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go index 8d532bbbacba..4886211ef856 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go @@ -9,8 +9,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore -// ApiResponse struct for ApiResponse -type ApiResponse struct { +// APIResponse struct for APIResponse +type APIResponse struct { Code int32 `json:"code,omitempty" xml:"code"` Type string `json:"type,omitempty" xml:"type"` Message string `json:"message,omitempty" xml:"message"` diff --git a/samples/client/petstore/go/go-petstore-withXml/model_category.go b/samples/client/petstore/go/go-petstore-withXml/model_category.go index 8c061446d4b6..1e905a435d21 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_category.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_category.go @@ -11,6 +11,6 @@ package petstore // Category struct for Category type Category struct { - Id int64 `json:"id,omitempty" xml:"id"` + ID int64 `json:"id,omitempty" xml:"id"` Name string `json:"name" xml:"name"` } diff --git a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go index 7509fd01c5f8..00df56498fa5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go @@ -26,7 +26,7 @@ type FormatTest struct { Binary *os.File `json:"binary,omitempty" xml:"binary"` Date string `json:"date" xml:"date"` DateTime time.Time `json:"dateTime,omitempty" xml:"dateTime"` - Uuid string `json:"uuid,omitempty" xml:"uuid"` + UUID string `json:"uuid,omitempty" xml:"uuid"` Password string `json:"password" xml:"password"` BigDecimal float64 `json:"BigDecimal,omitempty" xml:"BigDecimal"` } diff --git a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go index f0d4bd9f74a1..e2def20e330f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go @@ -14,7 +14,7 @@ import ( ) // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty" xml:"uuid"` + UUID string `json:"uuid,omitempty" xml:"uuid"` DateTime time.Time `json:"dateTime,omitempty" xml:"dateTime"` Map map[string]Animal `json:"map,omitempty" xml:"map"` } diff --git a/samples/client/petstore/go/go-petstore-withXml/model_order.go b/samples/client/petstore/go/go-petstore-withXml/model_order.go index f624fbcf7a70..f8a62054b22a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_order.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_order.go @@ -14,8 +14,8 @@ import ( ) // Order struct for Order type Order struct { - Id int64 `json:"id,omitempty" xml:"id"` - PetId int64 `json:"petId,omitempty" xml:"petId"` + ID int64 `json:"id,omitempty" xml:"id"` + PetID int64 `json:"petId,omitempty" xml:"petId"` Quantity int32 `json:"quantity,omitempty" xml:"quantity"` ShipDate time.Time `json:"shipDate,omitempty" xml:"shipDate"` // Order Status diff --git a/samples/client/petstore/go/go-petstore-withXml/model_pet.go b/samples/client/petstore/go/go-petstore-withXml/model_pet.go index dfe972977a7f..4b2ebd8b2f3b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_pet.go @@ -11,10 +11,10 @@ package petstore // Pet struct for Pet type Pet struct { - Id int64 `json:"id,omitempty" xml:"id"` + ID int64 `json:"id,omitempty" xml:"id"` Category Category `json:"category,omitempty" xml:"category"` Name string `json:"name" xml:"name"` - PhotoUrls []string `json:"photoUrls" xml:"photoUrls"` + PhotoURLs []string `json:"photoUrls" xml:"photoUrls"` Tags []Tag `json:"tags,omitempty" xml:"tags"` // pet status in the store Status string `json:"status,omitempty" xml:"status"` diff --git a/samples/client/petstore/go/go-petstore-withXml/model_tag.go b/samples/client/petstore/go/go-petstore-withXml/model_tag.go index 6f4abe36e46f..217979e10213 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_tag.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_tag.go @@ -11,6 +11,6 @@ package petstore // Tag struct for Tag type Tag struct { - Id int64 `json:"id,omitempty" xml:"id"` + ID int64 `json:"id,omitempty" xml:"id"` Name string `json:"name,omitempty" xml:"name"` } diff --git a/samples/client/petstore/go/go-petstore-withXml/model_user.go b/samples/client/petstore/go/go-petstore-withXml/model_user.go index 2e5962660aaf..84da50ff8c21 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_user.go @@ -11,7 +11,7 @@ package petstore // User struct for User type User struct { - Id int64 `json:"id,omitempty" xml:"id"` + ID int64 `json:"id,omitempty" xml:"id"` Username string `json:"username,omitempty" xml:"username"` FirstName string `json:"firstName,omitempty" xml:"firstName"` LastName string `json:"lastName,omitempty" xml:"lastName"` diff --git a/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go b/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go index c81766bc22c5..f2983c1d67b8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go @@ -9,8 +9,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore -// XmlItem struct for XmlItem -type XmlItem struct { +// XMLItem struct for XMLItem +type XMLItem struct { AttributeString string `json:"attribute_string,omitempty" xml:"attribute_string,attr"` AttributeNumber float32 `json:"attribute_number,omitempty" xml:"attribute_number,attr"` AttributeInteger int32 `json:"attribute_integer,omitempty" xml:"attribute_integer,attr"` diff --git a/samples/client/petstore/go/go-petstore-withXml/response.go b/samples/client/petstore/go/go-petstore-withXml/response.go index b0682c665688..07c3577bd722 100644 --- a/samples/client/petstore/go/go-petstore-withXml/response.go +++ b/samples/client/petstore/go/go-petstore-withXml/response.go @@ -14,8 +14,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -32,16 +32,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new DefaultAPIResponse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index b4fd0109ce2e..76a06848781c 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -32,47 +32,48 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user +*AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*FakeAPI* | [**CreateXMLItem**](docs/FakeAPI.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem +*FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**TestJSONFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store +*PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**GetPetByID**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet +*PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**GetOrderByID**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user +*UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system +*UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user ## Documentation For Models + - [APIResponse](docs/APIResponse.md) - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) @@ -82,7 +83,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - [Animal](docs/Animal.md) - - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) @@ -120,7 +120,7 @@ Class | Method | HTTP request | Description - [TypeHolderDefault](docs/TypeHolderDefault.md) - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) + - [XMLItem](docs/XMLItem.md) ## Documentation For Authorization diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index 44a84210ab25..491846fe3083 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// AnotherFakeApiService AnotherFakeApi service -type AnotherFakeApiService service +// AnotherFakeAPIService AnotherFakeAPI service +type AnotherFakeAPIService service /* Call123TestSpecialTags To test special tags @@ -31,7 +31,7 @@ To test special tags and operation ID starting with number * @param body client model @return Client */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 8c0e6c802216..b55e9edce6dc 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -24,16 +24,16 @@ var ( _ _context.Context ) -// FakeApiService FakeApi service -type FakeApiService service +// FakeAPIService FakeAPI service +type FakeAPIService service /* -CreateXmlItem creates an XmlItem +CreateXMLItem creates an XmlItem this route creates an XmlItem * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param xmlItem XmlItem Body + * @param xMLItem XmlItem Body */ -func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) { +func (a *FakeAPIService) CreateXMLItem(ctx _context.Context, xMLItem XMLItem) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -66,7 +66,7 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &xmlItem + localVarPostBody = &xMLItem r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err @@ -107,7 +107,7 @@ Test serialization of outer boolean types * @param "Body" (optional.Bool) - Input boolean as post body @return bool */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -203,7 +203,7 @@ Test serialization of object with outer number type * @param "Body" (optional.Interface of OuterComposite) - Input composite as post body @return OuterComposite */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -303,7 +303,7 @@ Test serialization of outer number types * @param "Body" (optional.Float32) - Input number as post body @return float32 */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -399,7 +399,7 @@ Test serialization of outer string types * @param "Body" (optional.String) - Input string as post body @return string */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -488,7 +488,7 @@ For this test, the body for this request much reference a schema named `Fil * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -555,7 +555,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param query * @param body */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -624,7 +624,7 @@ To test \"client\" model * @param body client model @return Client */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeAPIService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -738,7 +738,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン * @param "Password" (optional.String) - None * @param "Callback" (optional.String) - None */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -881,7 +881,7 @@ To test enum parameters * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) * @param "EnumFormString" (optional.String) - Form parameter enum test (string) */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -983,7 +983,7 @@ Fake endpoint to test group parameters (optional) * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters * @param "Int64Group" (optional.Int64) - Integer in group parameters */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1059,7 +1059,7 @@ TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param request body */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -1121,12 +1121,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa } /* -TestJsonFormData test json serialization of form data +TestJSONFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param field1 * @param param2 field2 */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestJSONFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1193,11 +1193,11 @@ To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pipe * @param ioutil - * @param http - * @param url + * @param hTTP + * @param uRL * @param context */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -1214,8 +1214,8 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarQueryParams.Add("pipe", parameterToString(pipe, "csv")) localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) + localVarQueryParams.Add("http", parameterToString(hTTP, "space")) + localVarQueryParams.Add("url", parameterToString(uRL, "csv")) t:=context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go index 7bd5e4b54e38..c0db5c046c3a 100644 --- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// FakeClassnameTags123ApiService FakeClassnameTags123Api service -type FakeClassnameTags123ApiService service +// FakeClassnameTags123APIService FakeClassnameTags123API service +type FakeClassnameTags123APIService service /* TestClassname To test class name in snake case @@ -31,7 +31,7 @@ To test class name in snake case * @param body client model @return Client */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123APIService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 6aea88752101..37186046d6ae 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// PetApiService PetApi service -type PetApiService service +// PetAPIService PetAPI service +type PetAPIService service /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -95,17 +95,17 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon // DeletePetOpts Optional parameters for the method 'DeletePet' type DeletePetOpts struct { - ApiKey optional.String + APIKey optional.String } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId Pet id to delete + * @param petID Pet id to delete * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - + * @param "APIKey" (optional.String) - */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) DeletePet(ctx _context.Context, petID int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -116,7 +116,7 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -139,8 +139,8 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if localVarOptionals != nil && localVarOptionals.APIKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.APIKey.Value(), "") } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { @@ -176,7 +176,7 @@ Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter @return []Pet */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -263,7 +263,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 * @param tags Tags to filter by @return []Pet */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -344,13 +344,13 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } /* -GetPetById Find pet by ID +GetPetByID Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to return + * @param petID ID of pet to return @return Pet */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetAPIService) GetPetByID(ctx _context.Context, petID int64) (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -362,7 +362,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -448,7 +448,7 @@ UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Pet object that needs to be added to the store */ -func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -518,12 +518,12 @@ type UpdatePetWithFormOpts struct { /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet that needs to be updated + * @param petID ID of pet that needs to be updated * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: * @param "Name" (optional.String) - Updated name of the pet * @param "Status" (optional.String) - Updated status of the pet */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePetWithForm(ctx _context.Context, petID int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -534,7 +534,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -599,25 +599,25 @@ type UploadFileOpts struct { /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param optional nil or *UploadFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFile(ctx _context.Context, petID int64, localVarOptionals *UploadFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -680,7 +680,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -711,25 +711,25 @@ type UploadFileWithRequiredFileOpts struct { /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFileWithRequiredFile(ctx _context.Context, petID int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -785,7 +785,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index a480157234a1..f8a654825546 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -22,16 +22,16 @@ var ( _ _context.Context ) -// StoreApiService StoreApi service -type StoreApiService service +// StoreAPIService StoreAPI service +type StoreAPIService service /* DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of the order that needs to be deleted + * @param orderID ID of the order that needs to be deleted */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreAPIService) DeleteOrder(ctx _context.Context, orderID string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -42,7 +42,7 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -98,7 +98,7 @@ Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return map[string]int32 */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreAPIService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -189,13 +189,13 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } /* -GetOrderById Find purchase order by ID +GetOrderByID Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of pet that needs to be fetched + * @param orderID ID of pet that needs to be fetched @return Order */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) GetOrderByID(ctx _context.Context, orderID int64) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -207,16 +207,16 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { - return localVarReturnValue, nil, reportError("orderId must be greater than 1") + if orderID < 1 { + return localVarReturnValue, nil, reportError("orderID must be greater than 1") } - if orderId > 5 { - return localVarReturnValue, nil, reportError("orderId must be less than 5") + if orderID > 5 { + return localVarReturnValue, nil, reportError("orderID must be less than 5") } // to determine the Content-Type header @@ -288,7 +288,7 @@ PlaceOrder Place an order for a pet * @param body order placed for purchasing the pet @return Order */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go index 154fc0962da3..49b65b19b447 100644 --- a/samples/client/petstore/go/go-petstore/api_user.go +++ b/samples/client/petstore/go/go-petstore/api_user.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service /* CreateUser Create user @@ -31,7 +31,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body Created user object */ -func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -97,7 +97,7 @@ CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -163,7 +163,7 @@ CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body List of user object */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -230,7 +230,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserAPIService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -297,7 +297,7 @@ GetUserByName Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @return User */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserAPIService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -385,7 +385,7 @@ LoginUser Logs user into the system * @param password The password for login in clear text @return string */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserAPIService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -470,7 +470,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserAPIService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -536,7 +536,7 @@ This can only be done by the logged in user. * @param username name that need to be deleted * @param body Updated user object */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { +func (a *UserAPIService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index 533439041493..abdf2bb81f09 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -47,17 +47,17 @@ type APIClient struct { // API Services - AnotherFakeApi *AnotherFakeApiService + AnotherFakeAPI *AnotherFakeAPIService - FakeApi *FakeApiService + FakeAPI *FakeAPIService - FakeClassnameTags123Api *FakeClassnameTags123ApiService + FakeClassnameTags123API *FakeClassnameTags123APIService - PetApi *PetApiService + PetAPI *PetAPIService - StoreApi *StoreApiService + StoreAPI *StoreAPIService - UserApi *UserApiService + UserAPI *UserAPIService } type service struct { @@ -76,12 +76,12 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) - c.FakeApi = (*FakeApiService)(&c.common) - c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) - c.PetApi = (*PetApiService)(&c.common) - c.StoreApi = (*StoreApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) + c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common) + c.FakeAPI = (*FakeAPIService)(&c.common) + c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common) + c.PetAPI = (*PetAPIService)(&c.common) + c.StoreAPI = (*StoreAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) return c } diff --git a/samples/client/petstore/go/go-petstore/configuration.go b/samples/client/petstore/go/go-petstore/configuration.go index 4a35e840836e..ccc5d7e587b6 100644 --- a/samples/client/petstore/go/go-petstore/configuration.go +++ b/samples/client/petstore/go/go-petstore/configuration.go @@ -62,7 +62,7 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - Url string + URL string Description string Variables map[string]ServerVariable } @@ -88,7 +88,7 @@ func NewConfiguration() *Configuration { Debug: false, Servers: []ServerConfiguration{ { - Url: "http://petstore.swagger.io:80/v2", + URL: "http://petstore.swagger.io:80/v2", Description: "No description provided", }, }, @@ -101,13 +101,13 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } -// ServerUrl returns URL based on server settings -func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) { +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { if index < 0 || len(c.Servers) <= index { return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) } server := c.Servers[index] - url := server.Url + url := server.URL // go through variables and replace placeholders for name, variable := range server.Variables { diff --git a/samples/client/petstore/go/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore/docs/APIResponse.md similarity index 96% rename from samples/client/petstore/go/go-petstore/docs/ApiResponse.md rename to samples/client/petstore/go/go-petstore/docs/APIResponse.md index 41d28fb578c1..7e1e5e951772 100644 --- a/samples/client/petstore/go/go-petstore/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore/docs/APIResponse.md @@ -1,4 +1,4 @@ -# ApiResponse +# APIResponse ## Properties diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md rename to samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md index 2c22f8f1b307..369a45ce0faa 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md @@ -1,10 +1,10 @@ -# \AnotherFakeApi +# \AnotherFakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags +[**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags diff --git a/samples/client/petstore/go/go-petstore/docs/Category.md b/samples/client/petstore/go/go-petstore/docs/Category.md index 01e8344bd06f..114e95fb79d6 100644 --- a/samples/client/petstore/go/go-petstore/docs/Category.md +++ b/samples/client/petstore/go/go-petstore/docs/Category.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [default to default-name] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeAPI.md similarity index 92% rename from samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md rename to samples/client/petstore/go/go-petstore/docs/FakeAPI.md index 1d85fdf9d313..ac1757e9cf15 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeAPI.md @@ -1,29 +1,29 @@ -# \FakeApi +# \FakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#CreateXmlItem) | **Post** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | +[**CreateXMLItem**](FakeAPI.md#CreateXMLItem) | **Post** /fake/create_xml_item | creates an XmlItem +[**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJSONFormData**](FakeAPI.md#TestJSONFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | -## CreateXmlItem +## CreateXMLItem -> CreateXmlItem(ctx, xmlItem) +> CreateXMLItem(ctx, xMLItem) creates an XmlItem @@ -35,7 +35,7 @@ this route creates an XmlItem Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | +**xMLItem** | [**XMLItem**](XMLItem.md)| XmlItem Body | ### Return type @@ -521,9 +521,9 @@ No authorization required [[Back to README]](../README.md) -## TestJsonFormData +## TestJSONFormData -> TestJsonFormData(ctx, param, param2) +> TestJSONFormData(ctx, param, param2) test json serialization of form data @@ -556,7 +556,7 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, hTTP, uRL, context) @@ -570,8 +570,8 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **pipe** | [**[]string**](string.md)| | **ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | +**hTTP** | [**[]string**](string.md)| | +**uRL** | [**[]string**](string.md)| | **context** | [**[]string**](string.md)| | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md similarity index 91% rename from samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md rename to samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md index 224542b70517..66bf7bd6ec03 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md @@ -1,10 +1,10 @@ -# \FakeClassnameTags123Api +# \FakeClassnameTags123API All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case +[**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/client/petstore/go/go-petstore/docs/FormatTest.md index 4e8c3332b639..04f83ed9c9f9 100644 --- a/samples/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore/docs/FormatTest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Binary** | [***os.File**](*os.File.md) | | [optional] **Date** | **string** | | **DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **Password** | **string** | | **BigDecimal** | **float64** | | [optional] diff --git a/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index a2ce1068b279..ae9b002443ec 100644 --- a/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **DateTime** | [**time.Time**](time.Time.md) | | [optional] **Map** | [**map[string]Animal**](Animal.md) | | [optional] diff --git a/samples/client/petstore/go/go-petstore/docs/Order.md b/samples/client/petstore/go/go-petstore/docs/Order.md index eeef0971005e..e19ca331fff8 100644 --- a/samples/client/petstore/go/go-petstore/docs/Order.md +++ b/samples/client/petstore/go/go-petstore/docs/Order.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**PetId** | **int64** | | [optional] +**ID** | **int64** | | [optional] +**PetID** | **int64** | | [optional] **Quantity** | **int32** | | [optional] **ShipDate** | [**time.Time**](time.Time.md) | | [optional] **Status** | **string** | Order Status | [optional] diff --git a/samples/client/petstore/go/go-petstore/docs/Pet.md b/samples/client/petstore/go/go-petstore/docs/Pet.md index c48104c63971..86d128857312 100644 --- a/samples/client/petstore/go/go-petstore/docs/Pet.md +++ b/samples/client/petstore/go/go-petstore/docs/Pet.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Category** | [**Category**](Category.md) | | [optional] **Name** | **string** | | -**PhotoUrls** | **[]string** | | +**PhotoURLs** | **[]string** | | **Tags** | [**[]Tag**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetAPI.md similarity index 88% rename from samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md rename to samples/client/petstore/go/go-petstore/docs/PetAPI.md index 6ee9afef754b..91282f7096f2 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetAPI.md @@ -1,18 +1,18 @@ -# \PetApi +# \PetAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetByID**](PetAPI.md#GetPetByID) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) @@ -50,7 +50,7 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petID, optional) Deletes a pet @@ -60,7 +60,7 @@ Deletes a pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | +**petID** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a pointer to a DeletePetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **aPIKey** | **optional.String**| | ### Return type @@ -159,9 +159,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPetById +## GetPetByID -> Pet GetPetById(ctx, petId) +> Pet GetPetByID(ctx, petID) Find pet by ID @@ -173,7 +173,7 @@ Returns a single pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petID** | **int64**| ID of pet to return | ### Return type @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petID, optional) Updates a pet in the store with form data @@ -237,7 +237,7 @@ Updates a pet in the store with form data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | +**petID** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> APIResponse UploadFile(ctx, petID, optional) uploads an image @@ -281,7 +281,7 @@ uploads an image Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -297,7 +297,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> APIResponse UploadFileWithRequiredFile(ctx, petID, requiredFile, optional) uploads an image (required) @@ -325,7 +325,7 @@ uploads an image (required) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters @@ -342,7 +342,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreAPI.md similarity index 86% rename from samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md rename to samples/client/petstore/go/go-petstore/docs/StoreAPI.md index 531ab09ff688..569c1c55ca34 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreAPI.md @@ -1,19 +1,19 @@ -# \StoreApi +# \StoreAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet +[**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderByID**](StoreAPI.md#GetOrderByID) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderID) Delete purchase order by ID @@ -25,7 +25,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderID** | **string**| ID of the order that needs to be deleted | ### Return type @@ -75,9 +75,9 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) -## GetOrderById +## GetOrderByID -> Order GetOrderById(ctx, orderId) +> Order GetOrderByID(ctx, orderID) Find purchase order by ID @@ -89,7 +89,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderID** | **int64**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/client/petstore/go/go-petstore/docs/Tag.md b/samples/client/petstore/go/go-petstore/docs/Tag.md index d6b3cc117b52..c22cd1ed1c97 100644 --- a/samples/client/petstore/go/go-petstore/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore/docs/Tag.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/User.md b/samples/client/petstore/go/go-petstore/docs/User.md index 7675d7ff701b..d89e52efe79c 100644 --- a/samples/client/petstore/go/go-petstore/docs/User.md +++ b/samples/client/petstore/go/go-petstore/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Username** | **string** | | [optional] **FirstName** | **string** | | [optional] **LastName** | **string** | | [optional] diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserAPI.md similarity index 92% rename from samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md rename to samples/client/petstore/go/go-petstore/docs/UserAPI.md index d9f16bb5fb0e..549b3eb6c273 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserAPI.md @@ -1,17 +1,17 @@ -# \UserApi +# \UserAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user diff --git a/samples/client/petstore/go/go-petstore/docs/XmlItem.md b/samples/client/petstore/go/go-petstore/docs/XMLItem.md similarity index 99% rename from samples/client/petstore/go/go-petstore/docs/XmlItem.md rename to samples/client/petstore/go/go-petstore/docs/XMLItem.md index 8a9c2dc0b504..fc3a0c85f15a 100644 --- a/samples/client/petstore/go/go-petstore/docs/XmlItem.md +++ b/samples/client/petstore/go/go-petstore/docs/XMLItem.md @@ -1,4 +1,4 @@ -# XmlItem +# XMLItem ## Properties diff --git a/samples/client/petstore/go/go-petstore/model_api_response.go b/samples/client/petstore/go/go-petstore/model_api_response.go index de022a0afac1..af2bb6d41bd6 100644 --- a/samples/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/client/petstore/go/go-petstore/model_api_response.go @@ -8,8 +8,8 @@ */ package petstore -// ApiResponse struct for ApiResponse -type ApiResponse struct { +// APIResponse struct for APIResponse +type APIResponse struct { Code int32 `json:"code,omitempty"` Type string `json:"type,omitempty"` Message string `json:"message,omitempty"` diff --git a/samples/client/petstore/go/go-petstore/model_category.go b/samples/client/petstore/go/go-petstore/model_category.go index 104410a316ae..59771c66348b 100644 --- a/samples/client/petstore/go/go-petstore/model_category.go +++ b/samples/client/petstore/go/go-petstore/model_category.go @@ -10,6 +10,6 @@ package petstore // Category struct for Category type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name"` } diff --git a/samples/client/petstore/go/go-petstore/model_format_test_.go b/samples/client/petstore/go/go-petstore/model_format_test_.go index 1c714c2ccae2..a5018e08f4e7 100644 --- a/samples/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore/model_format_test_.go @@ -25,7 +25,7 @@ type FormatTest struct { Binary *os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime time.Time `json:"dateTime,omitempty"` - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` Password string `json:"password"` BigDecimal float64 `json:"BigDecimal,omitempty"` } diff --git a/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go index fcd0bc9bbddf..549d0916963a 100644 --- a/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -13,7 +13,7 @@ import ( ) // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` DateTime time.Time `json:"dateTime,omitempty"` Map map[string]Animal `json:"map,omitempty"` } diff --git a/samples/client/petstore/go/go-petstore/model_order.go b/samples/client/petstore/go/go-petstore/model_order.go index f8bae432ae7d..1b4e80f31ff7 100644 --- a/samples/client/petstore/go/go-petstore/model_order.go +++ b/samples/client/petstore/go/go-petstore/model_order.go @@ -13,8 +13,8 @@ import ( ) // Order struct for Order type Order struct { - Id int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + ID int64 `json:"id,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` ShipDate time.Time `json:"shipDate,omitempty"` // Order Status diff --git a/samples/client/petstore/go/go-petstore/model_pet.go b/samples/client/petstore/go/go-petstore/model_pet.go index 2979b06b3eca..c67db8a3ba7c 100644 --- a/samples/client/petstore/go/go-petstore/model_pet.go +++ b/samples/client/petstore/go/go-petstore/model_pet.go @@ -10,10 +10,10 @@ package petstore // Pet struct for Pet type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` // pet status in the store Status string `json:"status,omitempty"` diff --git a/samples/client/petstore/go/go-petstore/model_tag.go b/samples/client/petstore/go/go-petstore/model_tag.go index 968bd8798a32..be52556920c0 100644 --- a/samples/client/petstore/go/go-petstore/model_tag.go +++ b/samples/client/petstore/go/go-petstore/model_tag.go @@ -10,6 +10,6 @@ package petstore // Tag struct for Tag type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/client/petstore/go/go-petstore/model_user.go b/samples/client/petstore/go/go-petstore/model_user.go index a6da6f9a87f2..84ceb1153372 100644 --- a/samples/client/petstore/go/go-petstore/model_user.go +++ b/samples/client/petstore/go/go-petstore/model_user.go @@ -10,7 +10,7 @@ package petstore // User struct for User type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` diff --git a/samples/client/petstore/go/go-petstore/model_xml_item.go b/samples/client/petstore/go/go-petstore/model_xml_item.go index 8d74417af787..080aabbd3baa 100644 --- a/samples/client/petstore/go/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go/go-petstore/model_xml_item.go @@ -8,8 +8,8 @@ */ package petstore -// XmlItem struct for XmlItem -type XmlItem struct { +// XMLItem struct for XMLItem +type XMLItem struct { AttributeString string `json:"attribute_string,omitempty"` AttributeNumber float32 `json:"attribute_number,omitempty"` AttributeInteger int32 `json:"attribute_integer,omitempty"` diff --git a/samples/client/petstore/go/go-petstore/response.go b/samples/client/petstore/go/go-petstore/response.go index c16f181f4e94..6f6f572b9b0d 100644 --- a/samples/client/petstore/go/go-petstore/response.go +++ b/samples/client/petstore/go/go-petstore/response.go @@ -13,8 +13,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -31,16 +31,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new DefaultAPIResponse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index 969fab1f667a..301f63219239 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -28,10 +28,10 @@ func TestMain(m *testing.M) { } func TestAddPet(t *testing.T) { - newPet := (sw.Pet{Id: 12830, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{ID: 12830, Name: "gopher", + PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{ID: 1, Name: "tag2"}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetAPI.AddPet(context.Background(), newPet) if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -42,7 +42,7 @@ func TestAddPet(t *testing.T) { } func TestFindPetsByStatusWithMissingParam(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetAPI.FindPetsByStatus(context.Background(), nil) if err != nil { t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err) @@ -57,7 +57,7 @@ func TestGetPetById(t *testing.T) { } func TestGetPetByIdWithInvalidID(t *testing.T) { - resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999) + resp, r, err := client.PetAPI.GetPetByID(context.Background(), 999999999) if r != nil && r.StatusCode == 404 { assertedError, ok := err.(sw.GenericOpenAPIError) a := assert.New(t) @@ -74,7 +74,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) { } func TestUpdatePetWithForm(t *testing.T) { - r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830, &sw.UpdatePetWithFormOpts{ + r, err := client.PetAPI.UpdatePetWithForm(context.Background(), 12830, &sw.UpdatePetWithFormOpts{ Name: optional.NewString("golang"), Status: optional.NewString("available"), }) @@ -92,7 +92,7 @@ func TestUpdatePetWithForm(t *testing.T) { func TestFindPetsByTag(t *testing.T) { var found = false - resp, r, err := client.PetApi.FindPetsByTags(context.Background(), []string{"tag2"}) + resp, r, err := client.PetAPI.FindPetsByTags(context.Background(), []string{"tag2"}) if err != nil { t.Fatalf("Error while getting pet by tag: %v", err) t.Log(r) @@ -103,7 +103,7 @@ func TestFindPetsByTag(t *testing.T) { assert := assert.New(t) for i := 0; i < len(resp); i++ { - if resp[i].Id == 12830 { + if resp[i].ID == 12830 { assert.Equal(resp[i].Status, "available", "Pet status should be `pending`") found = true } @@ -121,7 +121,7 @@ func TestFindPetsByTag(t *testing.T) { } func TestFindPetsByStatus(t *testing.T) { - resp, r, err := client.PetApi.FindPetsByStatus(context.Background(), []string{"available"}) + resp, r, err := client.PetAPI.FindPetsByStatus(context.Background(), []string{"available"}) if err != nil { t.Fatalf("Error while getting pet by id: %v", err) t.Log(r) @@ -144,7 +144,7 @@ func TestFindPetsByStatus(t *testing.T) { func TestUploadFile(t *testing.T) { file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFile(context.Background(), 12830, &sw.UploadFileOpts{ + _, r, err := client.PetAPI.UploadFile(context.Background(), 12830, &sw.UploadFileOpts{ AdditionalMetadata: optional.NewString("golang"), File: optional.NewInterface(file), }) @@ -162,7 +162,7 @@ func TestUploadFileRequired(t *testing.T) { return // remove when server supports this endpoint file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830, + _, r, err := client.PetAPI.UploadFileWithRequiredFile(context.Background(), 12830, file, &sw.UploadFileWithRequiredFileOpts{ AdditionalMetadata: optional.NewString("golang"), @@ -178,7 +178,7 @@ func TestUploadFileRequired(t *testing.T) { } func TestDeletePet(t *testing.T) { - r, err := client.PetApi.DeletePet(context.Background(), 12830, nil) + r, err := client.PetAPI.DeletePet(context.Background(), 12830, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -194,19 +194,19 @@ func TestConcurrency(t *testing.T) { errc := make(chan error) newPets := []sw.Pet{ - sw.Pet{Id: 912345, Name: "gopherFred", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912346, Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, - sw.Pet{Id: 912347, Name: "gopherRick", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "mia"}, - sw.Pet{Id: 912348, Name: "gopherJohn", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, - sw.Pet{Id: 912349, Name: "gopherAlf", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912350, Name: "gopherRob", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}, - sw.Pet{Id: 912351, Name: "gopherIan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912345, Name: "gopherFred", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912346, Name: "gopherDan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912347, Name: "gopherRick", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "mia"}, + sw.Pet{ID: 912348, Name: "gopherJohn", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, + sw.Pet{ID: 912349, Name: "gopherAlf", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912350, Name: "gopherRob", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "pending"}, + sw.Pet{ID: 912351, Name: "gopherIan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}, } // Add the pets. for _, pet := range newPets { go func(newPet sw.Pet) { - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetAPI.AddPet(nil, newPet) if r.StatusCode != 200 { t.Log(r) } @@ -228,7 +228,7 @@ func TestConcurrency(t *testing.T) { // Update all to active with the name gopherDan for _, pet := range newPets { go func(id int64) { - r, err := client.PetApi.UpdatePet(nil, sw.Pet{Id: (int64)(id), Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}) + r, err := client.PetAPI.UpdatePet(nil, sw.Pet{ID: (int64)(id), Name: "gopherDan", PhotoURLs: []string{"http://1.com", "http://2.com"}, Status: "active"}) if r.StatusCode != 200 { t.Log(r) } @@ -268,7 +268,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) { } func deletePet(t *testing.T, id int64) { - r, err := client.PetApi.DeletePet(context.Background(), id, nil) + r, err := client.PetAPI.DeletePet(context.Background(), id, nil) if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -280,11 +280,11 @@ func deletePet(t *testing.T, id int64) { func isPetCorrect(t *testing.T, id int64, name string, status string) { assert := assert.New(t) - resp, r, err := client.PetApi.GetPetById(context.Background(), id) + resp, r, err := client.PetAPI.GetPetByID(context.Background(), id) if err != nil { t.Fatalf("Error while getting pet by id: %v", err) } else { - assert.Equal(resp.Id, int64(id), "Pet id should be equal") + assert.Equal(resp.ID, int64(id), "Pet id should be equal") assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) assert.Equal(resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) diff --git a/samples/client/petstore/go/store_api_test.go b/samples/client/petstore/go/store_api_test.go index 3088adf7b40d..cc13ae6978da 100644 --- a/samples/client/petstore/go/store_api_test.go +++ b/samples/client/petstore/go/store_api_test.go @@ -11,14 +11,14 @@ import ( func TestPlaceOrder(t *testing.T) { newOrder := sw.Order{ - Id: 0, - PetId: 0, + ID: 0, + PetID: 0, Quantity: 0, ShipDate: time.Now().UTC(), Status: "placed", Complete: false} - _, r, err := client.StoreApi.PlaceOrder(context.Background(), newOrder) + _, r, err := client.StoreAPI.PlaceOrder(context.Background(), newOrder) if err != nil { // Skip parsing time error due to error in Petstore Test Server diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go index 012c608fab6b..19cae7a35c4d 100644 --- a/samples/client/petstore/go/user_api_test.go +++ b/samples/client/petstore/go/user_api_test.go @@ -11,7 +11,7 @@ import ( func TestCreateUser(t *testing.T) { newUser := sw.User{ - Id: 1000, + ID: 1000, FirstName: "gopher", LastName: "lang", Username: "gopher", @@ -20,7 +20,7 @@ func TestCreateUser(t *testing.T) { Phone: "5101112222", UserStatus: 1} - apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser) + apiResponse, err := client.UserAPI.CreateUser(context.Background(), newUser) if err != nil { t.Fatalf("Error while adding user: %v", err) @@ -34,7 +34,7 @@ func TestCreateUser(t *testing.T) { func TestCreateUsersWithArrayInput(t *testing.T) { newUsers := []sw.User{ sw.User{ - Id: int64(1001), + ID: int64(1001), FirstName: "gopher1", LastName: "lang1", Username: "gopher1", @@ -44,7 +44,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { UserStatus: int32(1), }, sw.User{ - Id: int64(1002), + ID: int64(1002), FirstName: "gopher2", LastName: "lang2", Username: "gopher2", @@ -55,7 +55,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { }, } - apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background(), newUsers) + apiResponse, err := client.UserAPI.CreateUsersWithArrayInput(context.Background(), newUsers) if err != nil { t.Fatalf("Error while adding users: %v", err) } @@ -64,13 +64,13 @@ func TestCreateUsersWithArrayInput(t *testing.T) { } //tear down - _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1") + _, err1 := client.UserAPI.DeleteUser(context.Background(), "gopher1") if err1 != nil { t.Errorf("Error while deleting user") t.Log(err1) } - _, err2 := client.UserApi.DeleteUser(context.Background(), "gopher2") + _, err2 := client.UserAPI.DeleteUser(context.Background(), "gopher2") if err2 != nil { t.Errorf("Error while deleting user") t.Log(err2) @@ -80,11 +80,11 @@ func TestCreateUsersWithArrayInput(t *testing.T) { func TestGetUserByName(t *testing.T) { assert := assert.New(t) - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher") if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(resp.Id, int64(1000), "User id should be equal") + assert.Equal(resp.ID, int64(1000), "User id should be equal") assert.Equal(resp.Username, "gopher", "User name should be gopher") assert.Equal(resp.LastName, "lang", "Last name should be lang") //t.Log(resp) @@ -95,7 +95,7 @@ func TestGetUserByName(t *testing.T) { } func TestGetUserByNameWithInvalidID(t *testing.T) { - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "999999999") if apiResponse != nil && apiResponse.StatusCode == 404 { return // This is a pass condition. API will return with a 404 error. } else if err != nil { @@ -113,7 +113,7 @@ func TestUpdateUser(t *testing.T) { assert := assert.New(t) newUser := sw.User{ - Id: 1000, + ID: 1000, FirstName: "gopher20", LastName: "lang20", Username: "gopher", @@ -122,7 +122,7 @@ func TestUpdateUser(t *testing.T) { Phone: "5101112222", UserStatus: 1} - apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser) + apiResponse, err := client.UserAPI.UpdateUser(context.Background(), "gopher", newUser) if err != nil { t.Fatalf("Error while deleting user by id: %v", err) } @@ -131,18 +131,18 @@ func TestUpdateUser(t *testing.T) { } //verify changings are correct - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher") if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(resp.Id, int64(1000), "User id should be equal") + assert.Equal(resp.ID, int64(1000), "User id should be equal") assert.Equal(resp.FirstName, "gopher20", "User name should be gopher") assert.Equal(resp.Password, "lang", "User name should be the same") } } func TestDeleteUser(t *testing.T) { - apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher") + apiResponse, err := client.UserAPI.DeleteUser(context.Background(), "gopher") if err != nil { t.Fatalf("Error while deleting user: %v", err) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md index d030bad98357..d8dccff36711 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md @@ -73,51 +73,51 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags -*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **Get** /foo | -*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **Get** /fake/health | Health check endpoint -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user +*AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*DefaultAPI* | [**FooGet**](docs/DefaultAPI.md#fooget) | **Get** /foo | +*FakeAPI* | [**FakeHealthGet**](docs/FakeAPI.md#fakehealthget) | **Get** /fake/health | Health check endpoint +*FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**TestJSONFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store +*PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**GetPetByID**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet +*PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**GetOrderByID**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user +*UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system +*UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user ## Documentation For Models + - [APIResponse](docs/APIResponse.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go index 70a24791ad27..9510bb77c441 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// AnotherFakeApiService AnotherFakeApi service -type AnotherFakeApiService service +// AnotherFakeAPIService AnotherFakeAPI service +type AnotherFakeAPIService service /* Call123TestSpecialTags To test special tags @@ -31,7 +31,7 @@ To test special tags and operation ID starting with number * @param client client model @return Client */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeApiService.Call123TestSpecialTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeAPIService.Call123TestSpecialTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go index dd977e26c038..1e71f08ca74e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go @@ -21,15 +21,15 @@ var ( _ _context.Context ) -// DefaultApiService DefaultApi service -type DefaultApiService service +// DefaultAPIService DefaultAPI service +type DefaultAPIService service /* FooGet Method for FooGet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return InlineResponseDefault */ -func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { +func (a *DefaultAPIService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -39,7 +39,7 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, localVarReturnValue InlineResponseDefault ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "DefaultApiService.FooGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "DefaultAPIService.FooGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go index 7f38a455470f..b9e20bca8a6d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// FakeApiService FakeApi service -type FakeApiService service +// FakeAPIService FakeAPI service +type FakeAPIService service /* FakeHealthGet Health check endpoint * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return HealthCheckResult */ -func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -42,7 +42,7 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, localVarReturnValue HealthCheckResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeHealthGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeHealthGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -128,7 +128,7 @@ Test serialization of outer boolean types * @param "Body" (optional.Bool) - Input boolean as post body @return bool */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -138,7 +138,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarReturnValue bool ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterBooleanSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterBooleanSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -229,7 +229,7 @@ Test serialization of object with outer number type * @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body @return OuterComposite */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -239,7 +239,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarReturnValue OuterComposite ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterCompositeSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterCompositeSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -334,7 +334,7 @@ Test serialization of outer number types * @param "Body" (optional.Float32) - Input number as post body @return float32 */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -344,7 +344,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarReturnValue float32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterNumberSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterNumberSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -435,7 +435,7 @@ Test serialization of outer string types * @param "Body" (optional.String) - Input string as post body @return string */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -445,7 +445,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterStringSerialize") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.FakeOuterStringSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -529,7 +529,7 @@ For this test, the body for this request much reference a schema named `Fil * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param fileSchemaTestClass */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -538,7 +538,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchema localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithFileSchema") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestBodyWithFileSchema") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -601,7 +601,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param query * @param user */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -610,7 +610,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithQueryParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestBodyWithQueryParams") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -675,7 +675,7 @@ To test \"client\" model * @param client client model @return Client */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeAPIService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -685,7 +685,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestClientModel") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestClientModel") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -794,7 +794,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン * @param "Password" (optional.String) - None * @param "Callback" (optional.String) - None */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -803,7 +803,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEndpointParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestEndpointParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -942,7 +942,7 @@ To test enum parameters * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) * @param "EnumFormString" (optional.String) - Form parameter enum test (string) */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -951,7 +951,7 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEnumParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestEnumParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1057,7 +1057,7 @@ Fake endpoint to test group parameters (optional) * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters * @param "Int64Group" (optional.Int64) - Integer in group parameters */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1066,7 +1066,7 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestGroupParameters") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestGroupParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1138,7 +1138,7 @@ TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param requestBody request body */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -1147,7 +1147,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestInlineAdditionalProperties") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestInlineAdditionalProperties") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1205,12 +1205,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re } /* -TestJsonFormData test json serialization of form data +TestJSONFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param field1 * @param param2 field2 */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestJSONFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1219,7 +1219,7 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestJsonFormData") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestJSONFormData") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1282,11 +1282,11 @@ To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pipe * @param ioutil - * @param http - * @param url + * @param hTTP + * @param uRL * @param context */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -1295,7 +1295,7 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestQueryParameterCollectionFormat") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeAPIService.TestQueryParameterCollectionFormat") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1316,8 +1316,8 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarQueryParams.Add("pipe", parameterToString(t, "multi")) } localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) + localVarQueryParams.Add("http", parameterToString(hTTP, "space")) + localVarQueryParams.Add("url", parameterToString(uRL, "csv")) t:=context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index a85385b85fd4..86290542c84f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// FakeClassnameTags123ApiService FakeClassnameTags123Api service -type FakeClassnameTags123ApiService service +// FakeClassnameTags123APIService FakeClassnameTags123API service +type FakeClassnameTags123APIService service /* TestClassname To test class name in snake case @@ -31,7 +31,7 @@ To test class name in snake case * @param client client model @return Client */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123APIService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123ApiService.TestClassname") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123APIService.TestClassname") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go index e52c8158f5c8..5340898a73bf 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// PetApiService PetApi service -type PetApiService service +// PetAPIService PetAPI service +type PetAPIService service /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pet Pet object that needs to be added to the store */ -func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -41,7 +41,7 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.AddPet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.AddPet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -100,17 +100,17 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons // DeletePetOpts Optional parameters for the method 'DeletePet' type DeletePetOpts struct { - ApiKey optional.String + APIKey optional.String } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId Pet id to delete + * @param petID Pet id to delete * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - + * @param "APIKey" (optional.String) - */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) DeletePet(ctx _context.Context, petID int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -119,13 +119,13 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.DeletePet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.DeletePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -148,8 +148,8 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if localVarOptionals != nil && localVarOptionals.APIKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.APIKey.Value(), "") } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { @@ -185,7 +185,7 @@ Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter @return []Pet */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -195,7 +195,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByStatus") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.FindPetsByStatus") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -277,7 +277,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 * @param tags Tags to filter by @return []Pet */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -287,7 +287,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.FindPetsByTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -363,13 +363,13 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } /* -GetPetById Find pet by ID +GetPetByID Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to return + * @param petID ID of pet to return @return Pet */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetAPIService) GetPetByID(ctx _context.Context, petID int64) (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -379,13 +379,13 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne localVarReturnValue Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.GetPetById") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.GetPetByID") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -473,7 +473,7 @@ UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pet Pet object that needs to be added to the store */ -func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -482,7 +482,7 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Resp localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePet") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UpdatePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -548,12 +548,12 @@ type UpdatePetWithFormOpts struct { /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet that needs to be updated + * @param petID ID of pet that needs to be updated * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: * @param "Name" (optional.String) - Updated name of the pet * @param "Status" (optional.String) - Updated status of the pet */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePetWithForm(ctx _context.Context, petID int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -562,13 +562,13 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePetWithForm") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UpdatePetWithForm") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -633,29 +633,29 @@ type UploadFileOpts struct { /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param optional nil or *UploadFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFile(ctx _context.Context, petID int64, localVarOptionals *UploadFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UploadFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -718,7 +718,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -749,29 +749,29 @@ type UploadFileWithRequiredFileOpts struct { /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFileWithRequiredFile(ctx _context.Context, petID int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFileWithRequiredFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetAPIService.UploadFileWithRequiredFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -827,7 +827,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go index f1162bb61c3e..eefd5f42c18a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go @@ -22,16 +22,16 @@ var ( _ _context.Context ) -// StoreApiService StoreApi service -type StoreApiService service +// StoreAPIService StoreAPI service +type StoreAPIService service /* DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of the order that needs to be deleted + * @param orderID ID of the order that needs to be deleted */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreAPIService) DeleteOrder(ctx _context.Context, orderID string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -40,13 +40,13 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.DeleteOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.DeleteOrder") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -102,7 +102,7 @@ Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return map[string]int32 */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreAPIService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -112,7 +112,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, localVarReturnValue map[string]int32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetInventory") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.GetInventory") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -200,13 +200,13 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } /* -GetOrderById Find purchase order by ID +GetOrderByID Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of pet that needs to be fetched + * @param orderID ID of pet that needs to be fetched @return Order */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) GetOrderByID(ctx _context.Context, orderID int64) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -216,22 +216,22 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetOrderById") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.GetOrderByID") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { - return localVarReturnValue, nil, reportError("orderId must be greater than 1") + if orderID < 1 { + return localVarReturnValue, nil, reportError("orderID must be greater than 1") } - if orderId > 5 { - return localVarReturnValue, nil, reportError("orderId must be less than 5") + if orderID > 5 { + return localVarReturnValue, nil, reportError("orderID must be less than 5") } // to determine the Content-Type header @@ -303,7 +303,7 @@ PlaceOrder Place an order for a pet * @param order order placed for purchasing the pet @return Order */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -313,7 +313,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.PlaceOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreAPIService.PlaceOrder") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go index 3d3d76f52a92..ff8cdf13c6fd 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service /* CreateUser Create user @@ -31,7 +31,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user Created user object */ -func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -40,7 +40,7 @@ func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp. localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -102,7 +102,7 @@ CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user List of user object */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -111,7 +111,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user [] localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithArrayInput") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUsersWithArrayInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -173,7 +173,7 @@ CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user List of user object */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -182,7 +182,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []U localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithListInput") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.CreateUsersWithListInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -245,7 +245,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserAPIService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -254,7 +254,7 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.DeleteUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.DeleteUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -316,7 +316,7 @@ GetUserByName Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @return User */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserAPIService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -326,7 +326,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U localVarReturnValue User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.GetUserByName") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.GetUserByName") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -408,7 +408,7 @@ LoginUser Logs user into the system * @param password The password for login in clear text @return string */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserAPIService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -418,7 +418,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LoginUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.LoginUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -498,7 +498,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserAPIService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -507,7 +507,7 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LogoutUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.LogoutUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -569,7 +569,7 @@ This can only be done by the logged in user. * @param username name that need to be deleted * @param user Updated user object */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { +func (a *UserAPIService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -578,7 +578,7 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.UpdateUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserAPIService.UpdateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go index 6b2ddc386d56..85fd1f352701 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go @@ -47,19 +47,19 @@ type APIClient struct { // API Services - AnotherFakeApi *AnotherFakeApiService + AnotherFakeAPI *AnotherFakeAPIService - DefaultApi *DefaultApiService + DefaultAPI *DefaultAPIService - FakeApi *FakeApiService + FakeAPI *FakeAPIService - FakeClassnameTags123Api *FakeClassnameTags123ApiService + FakeClassnameTags123API *FakeClassnameTags123APIService - PetApi *PetApiService + PetAPI *PetAPIService - StoreApi *StoreApiService + StoreAPI *StoreAPIService - UserApi *UserApiService + UserAPI *UserAPIService } type service struct { @@ -78,13 +78,13 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) - c.DefaultApi = (*DefaultApiService)(&c.common) - c.FakeApi = (*FakeApiService)(&c.common) - c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) - c.PetApi = (*PetApiService)(&c.common) - c.StoreApi = (*StoreApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) + c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common) + c.DefaultAPI = (*DefaultAPIService)(&c.common) + c.FakeAPI = (*FakeAPIService)(&c.common) + c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common) + c.PetAPI = (*PetAPIService)(&c.common) + c.StoreAPI = (*StoreAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) return c } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go index 58f47a496871..b19ce3ce56e7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go @@ -139,7 +139,7 @@ func NewConfiguration() *Configuration { }, }, OperationServers: map[string]ServerConfigurations{ - "PetApiService.AddPet": { + "PetAPIService.AddPet": { { URL: "http://petstore.swagger.io/v2", Description: "No description provided", @@ -149,7 +149,7 @@ func NewConfiguration() *Configuration { Description: "No description provided", }, }, - "PetApiService.UpdatePet": { + "PetAPIService.UpdatePet": { { URL: "http://petstore.swagger.io/v2", Description: "No description provided", diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/APIResponse.md similarity index 75% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/APIResponse.md index b0c891bbc960..1ea6b9177f92 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/APIResponse.md @@ -1,4 +1,4 @@ -# ApiResponse +# APIResponse ## Properties @@ -12,76 +12,76 @@ Name | Type | Description | Notes ### GetCode -`func (o *ApiResponse) GetCode() int32` +`func (o *APIResponse) GetCode() int32` GetCode returns the Code field if non-nil, zero value otherwise. ### GetCodeOk -`func (o *ApiResponse) GetCodeOk() (int32, bool)` +`func (o *APIResponse) GetCodeOk() (int32, bool)` GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasCode -`func (o *ApiResponse) HasCode() bool` +`func (o *APIResponse) HasCode() bool` HasCode returns a boolean if a field has been set. ### SetCode -`func (o *ApiResponse) SetCode(v int32)` +`func (o *APIResponse) SetCode(v int32)` SetCode gets a reference to the given int32 and assigns it to the Code field. ### GetType -`func (o *ApiResponse) GetType() string` +`func (o *APIResponse) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *ApiResponse) GetTypeOk() (string, bool)` +`func (o *APIResponse) GetTypeOk() (string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasType -`func (o *ApiResponse) HasType() bool` +`func (o *APIResponse) HasType() bool` HasType returns a boolean if a field has been set. ### SetType -`func (o *ApiResponse) SetType(v string)` +`func (o *APIResponse) SetType(v string)` SetType gets a reference to the given string and assigns it to the Type field. ### GetMessage -`func (o *ApiResponse) GetMessage() string` +`func (o *APIResponse) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *ApiResponse) GetMessageOk() (string, bool)` +`func (o *APIResponse) GetMessageOk() (string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### HasMessage -`func (o *ApiResponse) HasMessage() bool` +`func (o *APIResponse) HasMessage() bool` HasMessage returns a boolean if a field has been set. ### SetMessage -`func (o *ApiResponse) SetMessage(v string)` +`func (o *APIResponse) SetMessage(v string)` SetMessage gets a reference to the given string and assigns it to the Message field. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md similarity index 92% rename from samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md index fb674f202e19..d6a88daf35a0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeAPI.md @@ -1,10 +1,10 @@ -# \AnotherFakeApi +# \AnotherFakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags +[**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md index 88b525bade15..b10d17f3924b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -4,35 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Name** | Pointer to **string** | | [default to default-name] ## Methods -### GetId +### GetID -`func (o *Category) GetId() int64` +`func (o *Category) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Category) GetIdOk() (int64, bool)` +`func (o *Category) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Category) HasId() bool` +`func (o *Category) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Category) SetId(v int64)` +`func (o *Category) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetName diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultAPI.md similarity index 90% rename from samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultAPI.md index daf779c8e3e7..c7d2414fa5d5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultAPI.md @@ -1,10 +1,10 @@ -# \DefaultApi +# \DefaultAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo | +[**FooGet**](DefaultAPI.md#FooGet) | **Get** /foo | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md similarity index 93% rename from samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md index 3634a8771e29..1407e3a3adc3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeAPI.md @@ -1,23 +1,23 @@ -# \FakeApi +# \FakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**FakeHealthGet**](FakeApi.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint -[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | +[**FakeHealthGet**](FakeAPI.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint +[**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJSONFormData**](FakeAPI.md#TestJSONFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | @@ -515,9 +515,9 @@ No authorization required [[Back to README]](../README.md) -## TestJsonFormData +## TestJSONFormData -> TestJsonFormData(ctx, param, param2) +> TestJSONFormData(ctx, param, param2) test json serialization of form data @@ -550,7 +550,7 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, hTTP, uRL, context) @@ -564,8 +564,8 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **pipe** | [**[]string**](string.md)| | **ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | +**hTTP** | [**[]string**](string.md)| | +**uRL** | [**[]string**](string.md)| | **context** | [**[]string**](string.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md similarity index 91% rename from samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md index b070326cc328..240e1a6e776b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123API.md @@ -1,10 +1,10 @@ -# \FakeClassnameTags123Api +# \FakeClassnameTags123API All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case +[**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index 861d7aa3eb15..5c6d3d609e75 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Binary** | Pointer to [***os.File**](*os.File.md) | | [optional] **Date** | Pointer to **string** | | **DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] -**Uuid** | Pointer to **string** | | [optional] +**UUID** | Pointer to **string** | | [optional] **Password** | Pointer to **string** | | **PatternWithDigits** | Pointer to **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] **PatternWithDigitsAndDelimiter** | Pointer to **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] @@ -297,30 +297,30 @@ HasDateTime returns a boolean if a field has been set. SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. -### GetUuid +### GetUUID -`func (o *FormatTest) GetUuid() string` +`func (o *FormatTest) GetUUID() string` -GetUuid returns the Uuid field if non-nil, zero value otherwise. +GetUUID returns the UUID field if non-nil, zero value otherwise. -### GetUuidOk +### GetUUIDOk -`func (o *FormatTest) GetUuidOk() (string, bool)` +`func (o *FormatTest) GetUUIDOk() (string, bool)` -GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +GetUUIDOk returns a tuple with the UUID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasUuid +### HasUUID -`func (o *FormatTest) HasUuid() bool` +`func (o *FormatTest) HasUUID() bool` -HasUuid returns a boolean if a field has been set. +HasUUID returns a boolean if a field has been set. -### SetUuid +### SetUUID -`func (o *FormatTest) SetUuid(v string)` +`func (o *FormatTest) SetUUID(v string)` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +SetUUID gets a reference to the given string and assigns it to the UUID field. ### GetPassword diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 49f7c8eb7687..f56e3ee7c190 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,36 +4,36 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | Pointer to **string** | | [optional] +**UUID** | Pointer to **string** | | [optional] **DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] **Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional] ## Methods -### GetUuid +### GetUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUID() string` -GetUuid returns the Uuid field if non-nil, zero value otherwise. +GetUUID returns the UUID field if non-nil, zero value otherwise. -### GetUuidOk +### GetUUIDOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUIDOk() (string, bool)` -GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +GetUUIDOk returns a tuple with the UUID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasUuid +### HasUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUUID() bool` -HasUuid returns a boolean if a field has been set. +HasUUID returns a boolean if a field has been set. -### SetUuid +### SetUUID -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUUID(v string)` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +SetUUID gets a reference to the given string and assigns it to the UUID field. ### GetDateTime diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md index 8aa8bbd1ee54..a5ed5f11b3cd 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] -**PetId** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] +**PetID** | Pointer to **int64** | | [optional] **Quantity** | Pointer to **int32** | | [optional] **ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] **Status** | Pointer to **string** | Order Status | [optional] @@ -13,55 +13,55 @@ Name | Type | Description | Notes ## Methods -### GetId +### GetID -`func (o *Order) GetId() int64` +`func (o *Order) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Order) GetIdOk() (int64, bool)` +`func (o *Order) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Order) HasId() bool` +`func (o *Order) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Order) SetId(v int64)` +`func (o *Order) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. -### GetPetId +### GetPetID -`func (o *Order) GetPetId() int64` +`func (o *Order) GetPetID() int64` -GetPetId returns the PetId field if non-nil, zero value otherwise. +GetPetID returns the PetID field if non-nil, zero value otherwise. -### GetPetIdOk +### GetPetIDOk -`func (o *Order) GetPetIdOk() (int64, bool)` +`func (o *Order) GetPetIDOk() (int64, bool)` -GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +GetPetIDOk returns a tuple with the PetID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPetId +### HasPetID -`func (o *Order) HasPetId() bool` +`func (o *Order) HasPetID() bool` -HasPetId returns a boolean if a field has been set. +HasPetID returns a boolean if a field has been set. -### SetPetId +### SetPetID -`func (o *Order) SetPetId(v int64)` +`func (o *Order) SetPetID(v int64)` -SetPetId gets a reference to the given int64 and assigns it to the PetId field. +SetPetID gets a reference to the given int64 and assigns it to the PetID field. ### GetQuantity diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md index dba9589f9d77..3026ffa877dd 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -4,39 +4,39 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Category** | Pointer to [**Category**](Category.md) | | [optional] **Name** | Pointer to **string** | | -**PhotoUrls** | Pointer to **[]string** | | +**PhotoURLs** | Pointer to **[]string** | | **Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] **Status** | Pointer to **string** | pet status in the store | [optional] ## Methods -### GetId +### GetID -`func (o *Pet) GetId() int64` +`func (o *Pet) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Pet) GetIdOk() (int64, bool)` +`func (o *Pet) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Pet) HasId() bool` +`func (o *Pet) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Pet) SetId(v int64)` +`func (o *Pet) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetCategory @@ -88,30 +88,30 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. -### GetPhotoUrls +### GetPhotoURLs -`func (o *Pet) GetPhotoUrls() []string` +`func (o *Pet) GetPhotoURLs() []string` -GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +GetPhotoURLs returns the PhotoURLs field if non-nil, zero value otherwise. -### GetPhotoUrlsOk +### GetPhotoURLsOk -`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` +`func (o *Pet) GetPhotoURLsOk() ([]string, bool)` -GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +GetPhotoURLsOk returns a tuple with the PhotoURLs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPhotoUrls +### HasPhotoURLs -`func (o *Pet) HasPhotoUrls() bool` +`func (o *Pet) HasPhotoURLs() bool` -HasPhotoUrls returns a boolean if a field has been set. +HasPhotoURLs returns a boolean if a field has been set. -### SetPhotoUrls +### SetPhotoURLs -`func (o *Pet) SetPhotoUrls(v []string)` +`func (o *Pet) SetPhotoURLs(v []string)` -SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +SetPhotoURLs gets a reference to the given []string and assigns it to the PhotoURLs field. ### GetTags diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetAPI.md similarity index 88% rename from samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetAPI.md index 8118df7009bc..93af8022deeb 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetAPI.md @@ -1,18 +1,18 @@ -# \PetApi +# \PetAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetByID**](PetAPI.md#GetPetByID) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) @@ -50,7 +50,7 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petID, optional) Deletes a pet @@ -60,7 +60,7 @@ Deletes a pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | +**petID** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a pointer to a DeletePetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **aPIKey** | **optional.String**| | ### Return type @@ -159,9 +159,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPetById +## GetPetByID -> Pet GetPetById(ctx, petId) +> Pet GetPetByID(ctx, petID) Find pet by ID @@ -173,7 +173,7 @@ Returns a single pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petID** | **int64**| ID of pet to return | ### Return type @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petID, optional) Updates a pet in the store with form data @@ -237,7 +237,7 @@ Updates a pet in the store with form data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | +**petID** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> APIResponse UploadFile(ctx, petID, optional) uploads an image @@ -281,7 +281,7 @@ uploads an image Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -297,7 +297,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> APIResponse UploadFileWithRequiredFile(ctx, petID, requiredFile, optional) uploads an image (required) @@ -325,7 +325,7 @@ uploads an image (required) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters @@ -342,7 +342,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md similarity index 86% rename from samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md index c24d87bbfd68..80ab031240e0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreAPI.md @@ -1,19 +1,19 @@ -# \StoreApi +# \StoreAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet +[**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderByID**](StoreAPI.md#GetOrderByID) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderID) Delete purchase order by ID @@ -25,7 +25,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderID** | **string**| ID of the order that needs to be deleted | ### Return type @@ -75,9 +75,9 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) -## GetOrderById +## GetOrderByID -> Order GetOrderById(ctx, orderId) +> Order GetOrderByID(ctx, orderID) Find purchase order by ID @@ -89,7 +89,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderID** | **int64**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md index bf868298a5e7..689e7385128a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -4,35 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Name** | Pointer to **string** | | [optional] ## Methods -### GetId +### GetID -`func (o *Tag) GetId() int64` +`func (o *Tag) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *Tag) GetIdOk() (int64, bool)` +`func (o *Tag) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *Tag) HasId() bool` +`func (o *Tag) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *Tag) SetId(v int64)` +`func (o *Tag) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetName diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md index 8b93a65d8ab7..803486192001 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int64** | | [optional] +**ID** | Pointer to **int64** | | [optional] **Username** | Pointer to **string** | | [optional] **FirstName** | Pointer to **string** | | [optional] **LastName** | Pointer to **string** | | [optional] @@ -15,30 +15,30 @@ Name | Type | Description | Notes ## Methods -### GetId +### GetID -`func (o *User) GetId() int64` +`func (o *User) GetID() int64` -GetId returns the Id field if non-nil, zero value otherwise. +GetID returns the ID field if non-nil, zero value otherwise. -### GetIdOk +### GetIDOk -`func (o *User) GetIdOk() (int64, bool)` +`func (o *User) GetIDOk() (int64, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetIDOk returns a tuple with the ID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasId +### HasID -`func (o *User) HasId() bool` +`func (o *User) HasID() bool` -HasId returns a boolean if a field has been set. +HasID returns a boolean if a field has been set. -### SetId +### SetID -`func (o *User) SetId(v int64)` +`func (o *User) SetID(v int64)` -SetId gets a reference to the given int64 and assigns it to the Id field. +SetID gets a reference to the given int64 and assigns it to the ID field. ### GetUsername diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserAPI.md similarity index 92% rename from samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md rename to samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserAPI.md index 01d05d555cf2..e299500181f8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserAPI.md @@ -1,17 +1,17 @@ -# \UserApi +# \UserAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go index 94b4983c8b3c..1e08e1818518 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -14,15 +14,15 @@ import ( "encoding/json" ) -// ApiResponse struct for ApiResponse -type ApiResponse struct { +// APIResponse struct for APIResponse +type APIResponse struct { Code *int32 `json:"code,omitempty"` Type *string `json:"type,omitempty"` Message *string `json:"message,omitempty"` } // GetCode returns the Code field value if set, zero value otherwise. -func (o *ApiResponse) GetCode() int32 { +func (o *APIResponse) GetCode() int32 { if o == nil || o.Code == nil { var ret int32 return ret @@ -32,7 +32,7 @@ func (o *ApiResponse) GetCode() int32 { // GetCodeOk returns a tuple with the Code field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetCodeOk() (int32, bool) { +func (o *APIResponse) GetCodeOk() (int32, bool) { if o == nil || o.Code == nil { var ret int32 return ret, false @@ -41,7 +41,7 @@ func (o *ApiResponse) GetCodeOk() (int32, bool) { } // HasCode returns a boolean if a field has been set. -func (o *ApiResponse) HasCode() bool { +func (o *APIResponse) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -50,12 +50,12 @@ func (o *ApiResponse) HasCode() bool { } // SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *ApiResponse) SetCode(v int32) { +func (o *APIResponse) SetCode(v int32) { o.Code = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *ApiResponse) GetType() string { +func (o *APIResponse) GetType() string { if o == nil || o.Type == nil { var ret string return ret @@ -65,7 +65,7 @@ func (o *ApiResponse) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetTypeOk() (string, bool) { +func (o *APIResponse) GetTypeOk() (string, bool) { if o == nil || o.Type == nil { var ret string return ret, false @@ -74,7 +74,7 @@ func (o *ApiResponse) GetTypeOk() (string, bool) { } // HasType returns a boolean if a field has been set. -func (o *ApiResponse) HasType() bool { +func (o *APIResponse) HasType() bool { if o != nil && o.Type != nil { return true } @@ -83,12 +83,12 @@ func (o *ApiResponse) HasType() bool { } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *ApiResponse) SetType(v string) { +func (o *APIResponse) SetType(v string) { o.Type = &v } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ApiResponse) GetMessage() string { +func (o *APIResponse) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -98,7 +98,7 @@ func (o *ApiResponse) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetMessageOk() (string, bool) { +func (o *APIResponse) GetMessageOk() (string, bool) { if o == nil || o.Message == nil { var ret string return ret, false @@ -107,7 +107,7 @@ func (o *ApiResponse) GetMessageOk() (string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *ApiResponse) HasMessage() bool { +func (o *APIResponse) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -116,16 +116,16 @@ func (o *ApiResponse) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ApiResponse) SetMessage(v string) { +func (o *APIResponse) SetMessage(v string) { o.Message = &v } -type NullableApiResponse struct { - Value ApiResponse +type NullableAPIResponse struct { + Value APIResponse ExplicitNull bool } -func (v NullableApiResponse) MarshalJSON() ([]byte, error) { +func (v NullableAPIResponse) MarshalJSON() ([]byte, error) { switch { case v.ExplicitNull: return []byte("null"), nil @@ -134,7 +134,7 @@ func (v NullableApiResponse) MarshalJSON() ([]byte, error) { } } -func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { +func (v *NullableAPIResponse) UnmarshalJSON(src []byte) error { if bytes.Equal(src, []byte("null")) { v.ExplicitNull = true return nil diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go index f942863971d5..2a44d937b2ac 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go @@ -16,41 +16,41 @@ import ( // Category struct for Category type Category struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name string `json:"name"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Category) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Category) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Category) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Category) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Category) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Category) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Category) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Category) SetID(v int64) { + o.ID = &v } // GetName returns the Name field value diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go index 55d40bd04b7c..f9620d4ef257 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -29,7 +29,7 @@ type FormatTest struct { Binary **os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` - Uuid *string `json:"uuid,omitempty"` + UUID *string `json:"uuid,omitempty"` Password string `json:"password"` // A string that is a 10 digit number. Can have leading zeros. PatternWithDigits *string `json:"pattern_with_digits,omitempty"` @@ -346,37 +346,37 @@ func (o *FormatTest) SetDateTime(v time.Time) { o.DateTime = &v } -// GetUuid returns the Uuid field value if set, zero value otherwise. -func (o *FormatTest) GetUuid() string { - if o == nil || o.Uuid == nil { +// GetUUID returns the UUID field value if set, zero value otherwise. +func (o *FormatTest) GetUUID() string { + if o == nil || o.UUID == nil { var ret string return ret } - return *o.Uuid + return *o.UUID } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUUIDOk returns a tuple with the UUID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetUuidOk() (string, bool) { - if o == nil || o.Uuid == nil { +func (o *FormatTest) GetUUIDOk() (string, bool) { + if o == nil || o.UUID == nil { var ret string return ret, false } - return *o.Uuid, true + return *o.UUID, true } -// HasUuid returns a boolean if a field has been set. -func (o *FormatTest) HasUuid() bool { - if o != nil && o.Uuid != nil { +// HasUUID returns a boolean if a field has been set. +func (o *FormatTest) HasUUID() bool { + if o != nil && o.UUID != nil { return true } return false } -// SetUuid gets a reference to the given string and assigns it to the Uuid field. -func (o *FormatTest) SetUuid(v string) { - o.Uuid = &v +// SetUUID gets a reference to the given string and assigns it to the UUID field. +func (o *FormatTest) SetUUID(v string) { + o.UUID = &v } // GetPassword returns the Password field value diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index 1a0d83380c7a..325dbca88116 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -17,42 +17,42 @@ import ( // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid *string `json:"uuid,omitempty"` + UUID *string `json:"uuid,omitempty"` DateTime *time.Time `json:"dateTime,omitempty"` Map *map[string]Animal `json:"map,omitempty"` } -// GetUuid returns the Uuid field value if set, zero value otherwise. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { - if o == nil || o.Uuid == nil { +// GetUUID returns the UUID field value if set, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUID() string { + if o == nil || o.UUID == nil { var ret string return ret } - return *o.Uuid + return *o.UUID } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUUIDOk returns a tuple with the UUID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { - if o == nil || o.Uuid == nil { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUUIDOk() (string, bool) { + if o == nil || o.UUID == nil { var ret string return ret, false } - return *o.Uuid, true + return *o.UUID, true } -// HasUuid returns a boolean if a field has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool { - if o != nil && o.Uuid != nil { +// HasUUID returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUUID() bool { + if o != nil && o.UUID != nil { return true } return false } -// SetUuid gets a reference to the given string and assigns it to the Uuid field. -func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { - o.Uuid = &v +// SetUUID gets a reference to the given string and assigns it to the UUID field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUUID(v string) { + o.UUID = &v } // GetDateTime returns the DateTime field value if set, zero value otherwise. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go index b90caa6101ef..3ac3c67bd3a2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go @@ -17,8 +17,8 @@ import ( // Order struct for Order type Order struct { - Id *int64 `json:"id,omitempty"` - PetId *int64 `json:"petId,omitempty"` + ID *int64 `json:"id,omitempty"` + PetID *int64 `json:"petId,omitempty"` Quantity *int32 `json:"quantity,omitempty"` ShipDate *time.Time `json:"shipDate,omitempty"` // Order Status @@ -26,70 +26,70 @@ type Order struct { Complete *bool `json:"complete,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Order) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Order) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Order) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Order) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Order) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Order) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Order) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Order) SetID(v int64) { + o.ID = &v } -// GetPetId returns the PetId field value if set, zero value otherwise. -func (o *Order) GetPetId() int64 { - if o == nil || o.PetId == nil { +// GetPetID returns the PetID field value if set, zero value otherwise. +func (o *Order) GetPetID() int64 { + if o == nil || o.PetID == nil { var ret int64 return ret } - return *o.PetId + return *o.PetID } -// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise +// GetPetIDOk returns a tuple with the PetID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Order) GetPetIdOk() (int64, bool) { - if o == nil || o.PetId == nil { +func (o *Order) GetPetIDOk() (int64, bool) { + if o == nil || o.PetID == nil { var ret int64 return ret, false } - return *o.PetId, true + return *o.PetID, true } -// HasPetId returns a boolean if a field has been set. -func (o *Order) HasPetId() bool { - if o != nil && o.PetId != nil { +// HasPetID returns a boolean if a field has been set. +func (o *Order) HasPetID() bool { + if o != nil && o.PetID != nil { return true } return false } -// SetPetId gets a reference to the given int64 and assigns it to the PetId field. -func (o *Order) SetPetId(v int64) { - o.PetId = &v +// SetPetID gets a reference to the given int64 and assigns it to the PetID field. +func (o *Order) SetPetID(v int64) { + o.PetID = &v } // GetQuantity returns the Quantity field value if set, zero value otherwise. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go index 0986a6740662..23ce1267d0d6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go @@ -16,46 +16,46 @@ import ( // Pet struct for Pet type Pet struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Category *Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags *[]Tag `json:"tags,omitempty"` // pet status in the store Status *string `json:"status,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Pet) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Pet) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Pet) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Pet) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Pet) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Pet) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Pet) SetID(v int64) { + o.ID = &v } // GetCategory returns the Category field value if set, zero value otherwise. @@ -106,19 +106,19 @@ func (o *Pet) SetName(v string) { o.Name = v } -// GetPhotoUrls returns the PhotoUrls field value -func (o *Pet) GetPhotoUrls() []string { +// GetPhotoURLs returns the PhotoURLs field value +func (o *Pet) GetPhotoURLs() []string { if o == nil { var ret []string return ret } - return o.PhotoUrls + return o.PhotoURLs } -// SetPhotoUrls sets field value -func (o *Pet) SetPhotoUrls(v []string) { - o.PhotoUrls = v +// SetPhotoURLs sets field value +func (o *Pet) SetPhotoURLs(v []string) { + o.PhotoURLs = v } // GetTags returns the Tags field value if set, zero value otherwise. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go index f50a11101e43..73ed14607127 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go @@ -16,41 +16,41 @@ import ( // Tag struct for Tag type Tag struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name *string `json:"name,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *Tag) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *Tag) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *Tag) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *Tag) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *Tag) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *Tag) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *Tag) SetID(v int64) { + o.ID = &v } // GetName returns the Name field value if set, zero value otherwise. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go index dc7234de91b5..f7f948c573d6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go @@ -16,7 +16,7 @@ import ( // User struct for User type User struct { - Id *int64 `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Username *string `json:"username,omitempty"` FirstName *string `json:"firstName,omitempty"` LastName *string `json:"lastName,omitempty"` @@ -27,37 +27,37 @@ type User struct { UserStatus *int32 `json:"userStatus,omitempty"` } -// GetId returns the Id field value if set, zero value otherwise. -func (o *User) GetId() int64 { - if o == nil || o.Id == nil { +// GetID returns the ID field value if set, zero value otherwise. +func (o *User) GetID() int64 { + if o == nil || o.ID == nil { var ret int64 return ret } - return *o.Id + return *o.ID } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIDOk returns a tuple with the ID field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *User) GetIdOk() (int64, bool) { - if o == nil || o.Id == nil { +func (o *User) GetIDOk() (int64, bool) { + if o == nil || o.ID == nil { var ret int64 return ret, false } - return *o.Id, true + return *o.ID, true } -// HasId returns a boolean if a field has been set. -func (o *User) HasId() bool { - if o != nil && o.Id != nil { +// HasID returns a boolean if a field has been set. +func (o *User) HasID() bool { + if o != nil && o.ID != nil { return true } return false } -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *User) SetId(v int64) { - o.Id = &v +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *User) SetID(v int64) { + o.ID = &v } // GetUsername returns the Username field value if set, zero value otherwise. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go index 77346c8c1e36..28c39fd9316c 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/response.go @@ -13,8 +13,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -31,16 +31,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new APIResonse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index c0f191d001d2..8439c12f5d4d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -32,51 +32,51 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags -*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **Get** /foo | -*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **Get** /fake/health | Health check endpoint -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user +*AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags +*DefaultAPI* | [**FooGet**](docs/DefaultAPI.md#fooget) | **Get** /foo | +*FakeAPI* | [**FakeHealthGet**](docs/FakeAPI.md#fakehealthget) | **Get** /fake/health | Health check endpoint +*FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | +*FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | +*FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number | +*FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string | +*FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | +*FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | +*FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \"client\" model +*FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters +*FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**TestJSONFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data +*FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters | +*FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case +*PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store +*PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet +*PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**GetPetByID**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID +*PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet +*PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**GetOrderByID**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user +*UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user +*UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name +*UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system +*UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session +*UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user ## Documentation For Models + - [APIResponse](docs/APIResponse.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go index 9340243f47d3..a774cc06fca7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// AnotherFakeApiService AnotherFakeApi service -type AnotherFakeApiService service +// AnotherFakeAPIService AnotherFakeAPI service +type AnotherFakeAPIService service /* Call123TestSpecialTags To test special tags @@ -31,7 +31,7 @@ To test special tags and operation ID starting with number * @param client client model @return Client */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go index 0561d5d9fc3d..33e642cd91ca 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -21,15 +21,15 @@ var ( _ _context.Context ) -// DefaultApiService DefaultApi service -type DefaultApiService service +// DefaultAPIService DefaultAPI service +type DefaultAPIService service /* FooGet Method for FooGet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return InlineResponseDefault */ -func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { +func (a *DefaultAPIService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index b22a4bf9248a..dc694ad7a15b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// FakeApiService FakeApi service -type FakeApiService service +// FakeAPIService FakeAPI service +type FakeAPIService service /* FakeHealthGet Health check endpoint * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return HealthCheckResult */ -func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -123,7 +123,7 @@ Test serialization of outer boolean types * @param "Body" (optional.Bool) - Input boolean as post body @return bool */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -219,7 +219,7 @@ Test serialization of object with outer number type * @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body @return OuterComposite */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -319,7 +319,7 @@ Test serialization of outer number types * @param "Body" (optional.Float32) - Input number as post body @return float32 */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -415,7 +415,7 @@ Test serialization of outer string types * @param "Body" (optional.String) - Input string as post body @return string */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeAPIService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -504,7 +504,7 @@ For this test, the body for this request much reference a schema named `Fil * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param fileSchemaTestClass */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -571,7 +571,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param query * @param user */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -640,7 +640,7 @@ To test \"client\" model * @param client client model @return Client */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeAPIService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -754,7 +754,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン * @param "Password" (optional.String) - None * @param "Callback" (optional.String) - None */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -897,7 +897,7 @@ To test enum parameters * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) * @param "EnumFormString" (optional.String) - Form parameter enum test (string) */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1007,7 +1007,7 @@ Fake endpoint to test group parameters (optional) * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters * @param "Int64Group" (optional.Int64) - Integer in group parameters */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1083,7 +1083,7 @@ TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param requestBody request body */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -1145,12 +1145,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re } /* -TestJsonFormData test json serialization of form data +TestJSONFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param param field1 * @param param2 field2 */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestJSONFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -1217,11 +1217,11 @@ To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pipe * @param ioutil - * @param http - * @param url + * @param hTTP + * @param uRL * @param context */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -1246,8 +1246,8 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarQueryParams.Add("pipe", parameterToString(t, "multi")) } localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) + localVarQueryParams.Add("http", parameterToString(hTTP, "space")) + localVarQueryParams.Add("url", parameterToString(uRL, "csv")) t:=context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go index c27046f4ab43..81061e951066 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -21,8 +21,8 @@ var ( _ _context.Context ) -// FakeClassnameTags123ApiService FakeClassnameTags123Api service -type FakeClassnameTags123ApiService service +// FakeClassnameTags123APIService FakeClassnameTags123API service +type FakeClassnameTags123APIService service /* TestClassname To test class name in snake case @@ -31,7 +31,7 @@ To test class name in snake case * @param client client model @return Client */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123APIService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index 948315ce4399..bf33a141bea1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -24,15 +24,15 @@ var ( _ _context.Context ) -// PetApiService PetApi service -type PetApiService service +// PetAPIService PetAPI service +type PetAPIService service /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pet Pet object that needs to be added to the store */ -func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -95,17 +95,17 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons // DeletePetOpts Optional parameters for the method 'DeletePet' type DeletePetOpts struct { - ApiKey optional.String + APIKey optional.String } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId Pet id to delete + * @param petID Pet id to delete * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - + * @param "APIKey" (optional.String) - */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) DeletePet(ctx _context.Context, petID int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -116,7 +116,7 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -139,8 +139,8 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if localVarOptionals != nil && localVarOptionals.APIKey.IsSet() { + localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.APIKey.Value(), "") } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { @@ -176,7 +176,7 @@ Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter @return []Pet */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -263,7 +263,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 * @param tags Tags to filter by @return []Pet */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetAPIService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -344,13 +344,13 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } /* -GetPetById Find pet by ID +GetPetByID Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to return + * @param petID ID of pet to return @return Pet */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetAPIService) GetPetByID(ctx _context.Context, petID int64) (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -362,7 +362,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -448,7 +448,7 @@ UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pet Pet object that needs to be added to the store */ -func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -518,12 +518,12 @@ type UpdatePetWithFormOpts struct { /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet that needs to be updated + * @param petID ID of pet that needs to be updated * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: * @param "Name" (optional.String) - Updated name of the pet * @param "Status" (optional.String) - Updated status of the pet */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetAPIService) UpdatePetWithForm(ctx _context.Context, petID int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -534,7 +534,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -599,25 +599,25 @@ type UploadFileOpts struct { /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param optional nil or *UploadFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFile(ctx _context.Context, petID int64, localVarOptionals *UploadFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -680,7 +680,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -711,25 +711,25 @@ type UploadFileWithRequiredFileOpts struct { /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update + * @param petID ID of pet to update * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return APIResponse */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetAPIService) UploadFileWithRequiredFile(ctx _context.Context, petID int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (APIResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApiResponse + localVarReturnValue APIResponse ) // create path and map variables localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -785,7 +785,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApiResponse + var v APIResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index 2ff59f98fedb..464f72aef4ba 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -22,16 +22,16 @@ var ( _ _context.Context ) -// StoreApiService StoreApi service -type StoreApiService service +// StoreAPIService StoreAPI service +type StoreAPIService service /* DeleteOrder Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of the order that needs to be deleted + * @param orderID ID of the order that needs to be deleted */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreAPIService) DeleteOrder(ctx _context.Context, orderID string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -42,7 +42,7 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -98,7 +98,7 @@ Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return map[string]int32 */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreAPIService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -189,13 +189,13 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } /* -GetOrderById Find purchase order by ID +GetOrderByID Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orderId ID of pet that needs to be fetched + * @param orderID ID of pet that needs to be fetched @return Order */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) GetOrderByID(ctx _context.Context, orderID int64) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -207,16 +207,16 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord // create path and map variables localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderID, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { - return localVarReturnValue, nil, reportError("orderId must be greater than 1") + if orderID < 1 { + return localVarReturnValue, nil, reportError("orderID must be greater than 1") } - if orderId > 5 { - return localVarReturnValue, nil, reportError("orderId must be less than 5") + if orderID > 5 { + return localVarReturnValue, nil, reportError("orderID must be less than 5") } // to determine the Content-Type header @@ -288,7 +288,7 @@ PlaceOrder Place an order for a pet * @param order order placed for purchasing the pet @return Order */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { +func (a *StoreAPIService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_user.go b/samples/openapi3/client/petstore/go/go-petstore/api_user.go index 83f8f02f52bb..a2d658db6589 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_user.go @@ -22,8 +22,8 @@ var ( _ _context.Context ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service /* CreateUser Create user @@ -31,7 +31,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user Created user object */ -func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -97,7 +97,7 @@ CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user List of user object */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -163,7 +163,7 @@ CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param user List of user object */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserAPIService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -230,7 +230,7 @@ This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserAPIService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -297,7 +297,7 @@ GetUserByName Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @return User */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserAPIService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -385,7 +385,7 @@ LoginUser Logs user into the system * @param password The password for login in clear text @return string */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserAPIService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -470,7 +470,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserAPIService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -536,7 +536,7 @@ This can only be done by the logged in user. * @param username name that need to be deleted * @param user Updated user object */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { +func (a *UserAPIService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index 730e67621edf..029c7b34de5b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -47,19 +47,19 @@ type APIClient struct { // API Services - AnotherFakeApi *AnotherFakeApiService + AnotherFakeAPI *AnotherFakeAPIService - DefaultApi *DefaultApiService + DefaultAPI *DefaultAPIService - FakeApi *FakeApiService + FakeAPI *FakeAPIService - FakeClassnameTags123Api *FakeClassnameTags123ApiService + FakeClassnameTags123API *FakeClassnameTags123APIService - PetApi *PetApiService + PetAPI *PetAPIService - StoreApi *StoreApiService + StoreAPI *StoreAPIService - UserApi *UserApiService + UserAPI *UserAPIService } type service struct { @@ -78,13 +78,13 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) - c.DefaultApi = (*DefaultApiService)(&c.common) - c.FakeApi = (*FakeApiService)(&c.common) - c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) - c.PetApi = (*PetApiService)(&c.common) - c.StoreApi = (*StoreApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) + c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common) + c.DefaultAPI = (*DefaultAPIService)(&c.common) + c.FakeAPI = (*FakeAPIService)(&c.common) + c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common) + c.PetAPI = (*PetAPIService)(&c.common) + c.StoreAPI = (*StoreAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) return c } diff --git a/samples/openapi3/client/petstore/go/go-petstore/configuration.go b/samples/openapi3/client/petstore/go/go-petstore/configuration.go index 64ae25b46692..0cea73a83ef9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/configuration.go +++ b/samples/openapi3/client/petstore/go/go-petstore/configuration.go @@ -62,7 +62,7 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - Url string + URL string Description string Variables map[string]ServerVariable } @@ -88,7 +88,7 @@ func NewConfiguration() *Configuration { Debug: false, Servers: []ServerConfiguration{ { - Url: "http://{server}.swagger.io:{port}/v2", + URL: "http://{server}.swagger.io:{port}/v2", Description: "petstore server", Variables: map[string]ServerVariable{ "server": ServerVariable{ @@ -111,7 +111,7 @@ func NewConfiguration() *Configuration { }, }, { - Url: "https://localhost:8080/{version}", + URL: "https://localhost:8080/{version}", Description: "The local server", Variables: map[string]ServerVariable{ "version": ServerVariable{ @@ -134,13 +134,13 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } -// ServerUrl returns URL based on server settings -func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) { +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { if index < 0 || len(c.Servers) <= index { return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) } server := c.Servers[index] - url := server.Url + url := server.URL // go through variables and replace placeholders for name, variable := range server.Variables { diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go/go-petstore/docs/APIResponse.md similarity index 96% rename from samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/APIResponse.md index 41d28fb578c1..7e1e5e951772 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/APIResponse.md @@ -1,4 +1,4 @@ -# ApiResponse +# APIResponse ## Properties diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md similarity index 92% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md index fb674f202e19..d6a88daf35a0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md @@ -1,10 +1,10 @@ -# \AnotherFakeApi +# \AnotherFakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags +[**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md index 01e8344bd06f..114e95fb79d6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Category.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [default to default-name] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultAPI.md similarity index 90% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/DefaultAPI.md index daf779c8e3e7..c7d2414fa5d5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultAPI.md @@ -1,10 +1,10 @@ -# \DefaultApi +# \DefaultAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo | +[**FooGet**](DefaultAPI.md#FooGet) | **Get** /foo | diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeAPI.md similarity index 93% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/FakeAPI.md index 3634a8771e29..1407e3a3adc3 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeAPI.md @@ -1,23 +1,23 @@ -# \FakeApi +# \FakeAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**FakeHealthGet**](FakeApi.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint -[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | +[**FakeHealthGet**](FakeAPI.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint +[**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | +[**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | +[**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters +[**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJSONFormData**](FakeAPI.md#TestJSONFormData) | **Get** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters | @@ -515,9 +515,9 @@ No authorization required [[Back to README]](../README.md) -## TestJsonFormData +## TestJSONFormData -> TestJsonFormData(ctx, param, param2) +> TestJSONFormData(ctx, param, param2) test json serialization of form data @@ -550,7 +550,7 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, hTTP, uRL, context) @@ -564,8 +564,8 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **pipe** | [**[]string**](string.md)| | **ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | +**hTTP** | [**[]string**](string.md)| | +**uRL** | [**[]string**](string.md)| | **context** | [**[]string**](string.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md similarity index 91% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md index b070326cc328..240e1a6e776b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123API.md @@ -1,10 +1,10 @@ -# \FakeClassnameTags123Api +# \FakeClassnameTags123API All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case +[**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md index 0bc27ab1c4bc..0bef8df26916 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Binary** | [***os.File**](*os.File.md) | | [optional] **Date** | **string** | | **DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] **PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index a2ce1068b279..ae9b002443ec 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] +**UUID** | **string** | | [optional] **DateTime** | [**time.Time**](time.Time.md) | | [optional] **Map** | [**map[string]Animal**](Animal.md) | | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md index eeef0971005e..e19ca331fff8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Order.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**PetId** | **int64** | | [optional] +**ID** | **int64** | | [optional] +**PetID** | **int64** | | [optional] **Quantity** | **int32** | | [optional] **ShipDate** | [**time.Time**](time.Time.md) | | [optional] **Status** | **string** | Order Status | [optional] diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md index c48104c63971..86d128857312 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Pet.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Category** | [**Category**](Category.md) | | [optional] **Name** | **string** | | -**PhotoUrls** | **[]string** | | +**PhotoURLs** | **[]string** | | **Tags** | [**[]Tag**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetAPI.md similarity index 88% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/PetAPI.md index 8118df7009bc..93af8022deeb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetAPI.md @@ -1,18 +1,18 @@ -# \PetApi +# \PetAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store +[**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet +[**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status +[**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags +[**GetPetByID**](PetAPI.md#GetPetByID) | **Get** /pet/{petId} | Find pet by ID +[**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet +[**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data +[**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) @@ -50,7 +50,7 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petID, optional) Deletes a pet @@ -60,7 +60,7 @@ Deletes a pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | +**petID** | **int64**| Pet id to delete | **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a pointer to a DeletePetOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **aPIKey** | **optional.String**| | ### Return type @@ -159,9 +159,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPetById +## GetPetByID -> Pet GetPetById(ctx, petId) +> Pet GetPetByID(ctx, petID) Find pet by ID @@ -173,7 +173,7 @@ Returns a single pet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petID** | **int64**| ID of pet to return | ### Return type @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petID, optional) Updates a pet in the store with form data @@ -237,7 +237,7 @@ Updates a pet in the store with form data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | +**petID** | **int64**| ID of pet that needs to be updated | **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> APIResponse UploadFile(ctx, petID, optional) uploads an image @@ -281,7 +281,7 @@ uploads an image Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters ### Optional Parameters @@ -297,7 +297,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization @@ -315,7 +315,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> APIResponse UploadFileWithRequiredFile(ctx, petID, requiredFile, optional) uploads an image (required) @@ -325,7 +325,7 @@ uploads an image (required) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | +**petID** | **int64**| ID of pet to update | **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters @@ -342,7 +342,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**APIResponse**](ApiResponse.md) ### Authorization diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreAPI.md similarity index 86% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/StoreAPI.md index c24d87bbfd68..80ab031240e0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreAPI.md @@ -1,19 +1,19 @@ -# \StoreApi +# \StoreAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet +[**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status +[**GetOrderByID**](StoreAPI.md#GetOrderByID) | **Get** /store/order/{order_id} | Find purchase order by ID +[**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderID) Delete purchase order by ID @@ -25,7 +25,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderID** | **string**| ID of the order that needs to be deleted | ### Return type @@ -75,9 +75,9 @@ This endpoint does not need any parameter. [[Back to README]](../README.md) -## GetOrderById +## GetOrderByID -> Order GetOrderById(ctx, orderId) +> Order GetOrderByID(ctx, orderID) Find purchase order by ID @@ -89,7 +89,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderID** | **int64**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md index d6b3cc117b52..c22cd1ed1c97 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/Tag.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go/go-petstore/docs/User.md index 7675d7ff701b..d89e52efe79c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/User.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] +**ID** | **int64** | | [optional] **Username** | **string** | | [optional] **FirstName** | **string** | | [optional] **LastName** | **string** | | [optional] diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserAPI.md similarity index 92% rename from samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md rename to samples/openapi3/client/petstore/go/go-petstore/docs/UserAPI.md index 01d05d555cf2..e299500181f8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserAPI.md @@ -1,17 +1,17 @@ -# \UserApi +# \UserAPI All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user +[**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array +[**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array +[**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user +[**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name +[**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system +[**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session +[**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go index de022a0afac1..af2bb6d41bd6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go @@ -8,8 +8,8 @@ */ package petstore -// ApiResponse struct for ApiResponse -type ApiResponse struct { +// APIResponse struct for APIResponse +type APIResponse struct { Code int32 `json:"code,omitempty"` Type string `json:"type,omitempty"` Message string `json:"message,omitempty"` diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_category.go b/samples/openapi3/client/petstore/go/go-petstore/model_category.go index 104410a316ae..59771c66348b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_category.go @@ -10,6 +10,6 @@ package petstore // Category struct for Category type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name"` } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go index 52f04657bcb1..f12deea51426 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go @@ -25,7 +25,7 @@ type FormatTest struct { Binary *os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime time.Time `json:"dateTime,omitempty"` - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` Password string `json:"password"` // A string that is a 10 digit number. Can have leading zeros. PatternWithDigits string `json:"pattern_with_digits,omitempty"` diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go index fcd0bc9bbddf..549d0916963a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -13,7 +13,7 @@ import ( ) // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` DateTime time.Time `json:"dateTime,omitempty"` Map map[string]Animal `json:"map,omitempty"` } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_order.go b/samples/openapi3/client/petstore/go/go-petstore/model_order.go index f8bae432ae7d..1b4e80f31ff7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_order.go @@ -13,8 +13,8 @@ import ( ) // Order struct for Order type Order struct { - Id int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + ID int64 `json:"id,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` ShipDate time.Time `json:"shipDate,omitempty"` // Order Status diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go index 2979b06b3eca..c67db8a3ba7c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go @@ -10,10 +10,10 @@ package petstore // Pet struct for Pet type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` // pet status in the store Status string `json:"status,omitempty"` diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go index 968bd8798a32..be52556920c0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go @@ -10,6 +10,6 @@ package petstore // Tag struct for Tag type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_user.go b/samples/openapi3/client/petstore/go/go-petstore/model_user.go index a6da6f9a87f2..84ceb1153372 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_user.go @@ -10,7 +10,7 @@ package petstore // User struct for User type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` diff --git a/samples/openapi3/client/petstore/go/go-petstore/response.go b/samples/openapi3/client/petstore/go/go-petstore/response.go index c16f181f4e94..6f6f572b9b0d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/response.go @@ -13,8 +13,8 @@ import ( "net/http" ) -// APIResponse stores the API response returned by the server. -type APIResponse struct { +// DefaultAPIResponse stores the API response returned by the server. +type DefaultAPIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. @@ -31,16 +31,16 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. -func NewAPIResponse(r *http.Response) *APIResponse { +// NewDefaultAPIResponse returns a new DefaultAPIResponse object. +func NewDefaultAPIResponse(r *http.Response) *DefaultAPIResponse { - response := &APIResponse{Response: r} + response := &DefaultAPIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { +// NewDefaultAPIResponseWithError returns a new DefaultAPIResponse object with the provided error message. +func NewDefaultAPIResponseWithError(errorMessage string) *DefaultAPIResponse { - response := &APIResponse{Message: errorMessage} + response := &DefaultAPIResponse{Message: errorMessage} return response } diff --git a/samples/openapi3/server/petstore/go-api-server/go.mod b/samples/openapi3/server/petstore/go-api-server/go.mod new file mode 100644 index 000000000000..5b6a67c74e20 --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go.mod @@ -0,0 +1,5 @@ +module github.com/GIT_USER_ID/GIT_REPO_ID + +go 1.13 + +require github.com/gorilla/mux v1.7.3 diff --git a/samples/openapi3/server/petstore/go-api-server/go/api.go b/samples/openapi3/server/petstore/go-api-server/go/api.go new file mode 100644 index 000000000000..c4eb009948f4 --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api.go @@ -0,0 +1,185 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "net/http" + "os" + "os" +) + + +// AnotherFakeAPIRouter defines the required methods for binding the api requests to a responses for the AnotherFakeAPI +// The AnotherFakeAPIRouter implementation should parse necessary information from the http request, +// pass the data to a AnotherFakeAPIServicer to perform the required actions, then write the service results to the http response. +type AnotherFakeAPIRouter interface { + Call123TestSpecialTags(http.ResponseWriter, *http.Request) +} +// DefaultAPIRouter defines the required methods for binding the api requests to a responses for the DefaultAPI +// The DefaultAPIRouter implementation should parse necessary information from the http request, +// pass the data to a DefaultAPIServicer to perform the required actions, then write the service results to the http response. +type DefaultAPIRouter interface { + FooGet(http.ResponseWriter, *http.Request) +} +// FakeAPIRouter defines the required methods for binding the api requests to a responses for the FakeAPI +// The FakeAPIRouter implementation should parse necessary information from the http request, +// pass the data to a FakeAPIServicer to perform the required actions, then write the service results to the http response. +type FakeAPIRouter interface { + FakeHealthGet(http.ResponseWriter, *http.Request) + FakeOuterBooleanSerialize(http.ResponseWriter, *http.Request) + FakeOuterCompositeSerialize(http.ResponseWriter, *http.Request) + FakeOuterNumberSerialize(http.ResponseWriter, *http.Request) + FakeOuterStringSerialize(http.ResponseWriter, *http.Request) + TestBodyWithFileSchema(http.ResponseWriter, *http.Request) + TestBodyWithQueryParams(http.ResponseWriter, *http.Request) + TestClientModel(http.ResponseWriter, *http.Request) + TestEndpointParameters(http.ResponseWriter, *http.Request) + TestEnumParameters(http.ResponseWriter, *http.Request) + TestGroupParameters(http.ResponseWriter, *http.Request) + TestInlineAdditionalProperties(http.ResponseWriter, *http.Request) + TestJSONFormData(http.ResponseWriter, *http.Request) + TestQueryParameterCollectionFormat(http.ResponseWriter, *http.Request) +} +// FakeClassnameTags123APIRouter defines the required methods for binding the api requests to a responses for the FakeClassnameTags123API +// The FakeClassnameTags123APIRouter implementation should parse necessary information from the http request, +// pass the data to a FakeClassnameTags123APIServicer to perform the required actions, then write the service results to the http response. +type FakeClassnameTags123APIRouter interface { + TestClassname(http.ResponseWriter, *http.Request) +} +// PetAPIRouter defines the required methods for binding the api requests to a responses for the PetAPI +// The PetAPIRouter implementation should parse necessary information from the http request, +// pass the data to a PetAPIServicer to perform the required actions, then write the service results to the http response. +type PetAPIRouter interface { + AddPet(http.ResponseWriter, *http.Request) + DeletePet(http.ResponseWriter, *http.Request) + FindPetsByStatus(http.ResponseWriter, *http.Request) + FindPetsByTags(http.ResponseWriter, *http.Request) + GetPetByID(http.ResponseWriter, *http.Request) + UpdatePet(http.ResponseWriter, *http.Request) + UpdatePetWithForm(http.ResponseWriter, *http.Request) + UploadFile(http.ResponseWriter, *http.Request) + UploadFileWithRequiredFile(http.ResponseWriter, *http.Request) +} +// StoreAPIRouter defines the required methods for binding the api requests to a responses for the StoreAPI +// The StoreAPIRouter implementation should parse necessary information from the http request, +// pass the data to a StoreAPIServicer to perform the required actions, then write the service results to the http response. +type StoreAPIRouter interface { + DeleteOrder(http.ResponseWriter, *http.Request) + GetInventory(http.ResponseWriter, *http.Request) + GetOrderByID(http.ResponseWriter, *http.Request) + PlaceOrder(http.ResponseWriter, *http.Request) +} +// UserAPIRouter defines the required methods for binding the api requests to a responses for the UserAPI +// The UserAPIRouter implementation should parse necessary information from the http request, +// pass the data to a UserAPIServicer to perform the required actions, then write the service results to the http response. +type UserAPIRouter interface { + CreateUser(http.ResponseWriter, *http.Request) + CreateUsersWithArrayInput(http.ResponseWriter, *http.Request) + CreateUsersWithListInput(http.ResponseWriter, *http.Request) + DeleteUser(http.ResponseWriter, *http.Request) + GetUserByName(http.ResponseWriter, *http.Request) + LoginUser(http.ResponseWriter, *http.Request) + LogoutUser(http.ResponseWriter, *http.Request) + UpdateUser(http.ResponseWriter, *http.Request) +} + + +// AnotherFakeAPIServicer defines the api actions for the AnotherFakeAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type AnotherFakeAPIServicer interface { + Call123TestSpecialTags(Client) (interface{}, error) +} + + +// DefaultAPIServicer defines the api actions for the DefaultAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type DefaultAPIServicer interface { + FooGet() (interface{}, error) +} + + +// FakeAPIServicer defines the api actions for the FakeAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type FakeAPIServicer interface { + FakeHealthGet() (interface{}, error) + FakeOuterBooleanSerialize(bool) (interface{}, error) + FakeOuterCompositeSerialize(OuterComposite) (interface{}, error) + FakeOuterNumberSerialize(float32) (interface{}, error) + FakeOuterStringSerialize(string) (interface{}, error) + TestBodyWithFileSchema(FileSchemaTestClass) (interface{}, error) + TestBodyWithQueryParams(string, User) (interface{}, error) + TestClientModel(Client) (interface{}, error) + TestEndpointParameters(float32, float64, string, string, int32, int32, int64, float32, string, *os.File, string, time.Time, string, string) (interface{}, error) + TestEnumParameters([]string, string, []string, string, int32, float64, []string, string) (interface{}, error) + TestGroupParameters(int32, bool, int64, int32, bool, int64) (interface{}, error) + TestInlineAdditionalProperties(map[string]string) (interface{}, error) + TestJSONFormData(string, string) (interface{}, error) + TestQueryParameterCollectionFormat([]string, []string, []string, []string, []string) (interface{}, error) +} + + +// FakeClassnameTags123APIServicer defines the api actions for the FakeClassnameTags123API service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type FakeClassnameTags123APIServicer interface { + TestClassname(Client) (interface{}, error) +} + + +// PetAPIServicer defines the api actions for the PetAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type PetAPIServicer interface { + AddPet(Pet) (interface{}, error) + DeletePet(int64, string) (interface{}, error) + FindPetsByStatus([]string) (interface{}, error) + FindPetsByTags([]string) (interface{}, error) + GetPetByID(int64) (interface{}, error) + UpdatePet(Pet) (interface{}, error) + UpdatePetWithForm(int64, string, string) (interface{}, error) + UploadFile(int64, string, *os.File) (interface{}, error) + UploadFileWithRequiredFile(int64, *os.File, string) (interface{}, error) +} + + +// StoreAPIServicer defines the api actions for the StoreAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type StoreAPIServicer interface { + DeleteOrder(string) (interface{}, error) + GetInventory() (interface{}, error) + GetOrderByID(int64) (interface{}, error) + PlaceOrder(Order) (interface{}, error) +} + + +// UserAPIServicer defines the api actions for the UserAPI service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type UserAPIServicer interface { + CreateUser(User) (interface{}, error) + CreateUsersWithArrayInput([]User) (interface{}, error) + CreateUsersWithListInput([]User) (interface{}, error) + DeleteUser(string) (interface{}, error) + GetUserByName(string) (interface{}, error) + LoginUser(string, string) (interface{}, error) + LogoutUser() (interface{}, error) + UpdateUser(string, User) (interface{}, error) +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go index 804316ecb215..8e92d2cbdc01 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A AnotherFakeApiController binds http requests to an api service and writes the service results to the http response -type AnotherFakeApiController struct { - service AnotherFakeApiServicer +// A AnotherFakeAPIController binds http requests to an api service and writes the service results to the http response +type AnotherFakeAPIController struct { + service AnotherFakeAPIServicer } -// NewAnotherFakeApiController creates a default api controller -func NewAnotherFakeApiController(s AnotherFakeApiServicer) Router { - return &AnotherFakeApiController{ service: s } +// NewAnotherFakeAPIController creates a default api controller +func NewAnotherFakeAPIController(s AnotherFakeAPIServicer) Router { + return &AnotherFakeAPIController{ service: s } } -// Routes returns all of the api route for the AnotherFakeApiController -func (c *AnotherFakeApiController) Routes() Routes { +// Routes returns all of the api route for the AnotherFakeAPIController +func (c *AnotherFakeAPIController) Routes() Routes { return Routes{ { "Call123TestSpecialTags", @@ -40,7 +40,7 @@ func (c *AnotherFakeApiController) Routes() Routes { } // Call123TestSpecialTags - To test special tags -func (c *AnotherFakeApiController) Call123TestSpecialTags(w http.ResponseWriter, r *http.Request) { +func (c *AnotherFakeAPIController) Call123TestSpecialTags(w http.ResponseWriter, r *http.Request) { client := &Client{} if err := json.NewDecoder(r.Body).Decode(&client); err != nil { w.WriteHeader(500) diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_another_fake_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_another_fake_service.go new file mode 100644 index 000000000000..6f44aa0c5c36 --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_another_fake_service.go @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" +) + +// AnotherFakeAPIService is a service that implents the logic for the AnotherFakeAPIServicer +// This service should implement the business logic for every endpoint for the AnotherFakeAPI API. +// Include any external packages or services that will be required by this service. +type AnotherFakeAPIService struct { +} + +// NewAnotherFakeAPIService creates a default api service +func NewAnotherFakeAPIService() AnotherFakeAPIServicer { + return &AnotherFakeAPIService{} +} + +// Call123TestSpecialTags - To test special tags +func (s *AnotherFakeAPIService) Call123TestSpecialTags(client Client) (interface{}, error) { + // TODO - update Call123TestSpecialTags with the required logic for this service method. + // Add api_another_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'Call123TestSpecialTags' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_default.go b/samples/openapi3/server/petstore/go-api-server/go/api_default.go index c1618f26c9c6..04f85488ae82 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_default.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_default.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A DefaultApiController binds http requests to an api service and writes the service results to the http response -type DefaultApiController struct { - service DefaultApiServicer +// A DefaultAPIController binds http requests to an api service and writes the service results to the http response +type DefaultAPIController struct { + service DefaultAPIServicer } -// NewDefaultApiController creates a default api controller -func NewDefaultApiController(s DefaultApiServicer) Router { - return &DefaultApiController{ service: s } +// NewDefaultAPIController creates a default api controller +func NewDefaultAPIController(s DefaultAPIServicer) Router { + return &DefaultAPIController{ service: s } } -// Routes returns all of the api route for the DefaultApiController -func (c *DefaultApiController) Routes() Routes { +// Routes returns all of the api route for the DefaultAPIController +func (c *DefaultAPIController) Routes() Routes { return Routes{ { "FooGet", @@ -40,7 +40,7 @@ func (c *DefaultApiController) Routes() Routes { } // FooGet - -func (c *DefaultApiController) FooGet(w http.ResponseWriter, r *http.Request) { +func (c *DefaultAPIController) FooGet(w http.ResponseWriter, r *http.Request) { result, err := c.service.FooGet() if err != nil { w.WriteHeader(500) diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_default_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_default_service.go new file mode 100644 index 000000000000..2b3f2902258e --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_default_service.go @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" +) + +// DefaultAPIService is a service that implents the logic for the DefaultAPIServicer +// This service should implement the business logic for every endpoint for the DefaultAPI API. +// Include any external packages or services that will be required by this service. +type DefaultAPIService struct { +} + +// NewDefaultAPIService creates a default api service +func NewDefaultAPIService() DefaultAPIServicer { + return &DefaultAPIService{} +} + +// FooGet - +func (s *DefaultAPIService) FooGet() (interface{}, error) { + // TODO - update FooGet with the required logic for this service method. + // Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FooGet' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go index 94b55953254c..3be1e9e3480e 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A FakeApiController binds http requests to an api service and writes the service results to the http response -type FakeApiController struct { - service FakeApiServicer +// A FakeAPIController binds http requests to an api service and writes the service results to the http response +type FakeAPIController struct { + service FakeAPIServicer } -// NewFakeApiController creates a default api controller -func NewFakeApiController(s FakeApiServicer) Router { - return &FakeApiController{ service: s } +// NewFakeAPIController creates a default api controller +func NewFakeAPIController(s FakeAPIServicer) Router { + return &FakeAPIController{ service: s } } -// Routes returns all of the api route for the FakeApiController -func (c *FakeApiController) Routes() Routes { +// Routes returns all of the api route for the FakeAPIController +func (c *FakeAPIController) Routes() Routes { return Routes{ { "FakeHealthGet", @@ -103,10 +103,10 @@ func (c *FakeApiController) Routes() Routes { c.TestInlineAdditionalProperties, }, { - "TestJsonFormData", + "TestJSONFormData", strings.ToUpper("Get"), "/v2/fake/jsonFormData", - c.TestJsonFormData, + c.TestJSONFormData, }, { "TestQueryParameterCollectionFormat", @@ -118,7 +118,7 @@ func (c *FakeApiController) Routes() Routes { } // FakeHealthGet - Health check endpoint -func (c *FakeApiController) FakeHealthGet(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) FakeHealthGet(w http.ResponseWriter, r *http.Request) { result, err := c.service.FakeHealthGet() if err != nil { w.WriteHeader(500) @@ -129,7 +129,7 @@ func (c *FakeApiController) FakeHealthGet(w http.ResponseWriter, r *http.Request } // FakeOuterBooleanSerialize - -func (c *FakeApiController) FakeOuterBooleanSerialize(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) FakeOuterBooleanSerialize(w http.ResponseWriter, r *http.Request) { body := &bool{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -146,7 +146,7 @@ func (c *FakeApiController) FakeOuterBooleanSerialize(w http.ResponseWriter, r * } // FakeOuterCompositeSerialize - -func (c *FakeApiController) FakeOuterCompositeSerialize(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) FakeOuterCompositeSerialize(w http.ResponseWriter, r *http.Request) { outerComposite := &OuterComposite{} if err := json.NewDecoder(r.Body).Decode(&outerComposite); err != nil { w.WriteHeader(500) @@ -163,7 +163,7 @@ func (c *FakeApiController) FakeOuterCompositeSerialize(w http.ResponseWriter, r } // FakeOuterNumberSerialize - -func (c *FakeApiController) FakeOuterNumberSerialize(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) FakeOuterNumberSerialize(w http.ResponseWriter, r *http.Request) { body := &float32{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -180,7 +180,7 @@ func (c *FakeApiController) FakeOuterNumberSerialize(w http.ResponseWriter, r *h } // FakeOuterStringSerialize - -func (c *FakeApiController) FakeOuterStringSerialize(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) FakeOuterStringSerialize(w http.ResponseWriter, r *http.Request) { body := &string{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -197,7 +197,7 @@ func (c *FakeApiController) FakeOuterStringSerialize(w http.ResponseWriter, r *h } // TestBodyWithFileSchema - -func (c *FakeApiController) TestBodyWithFileSchema(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestBodyWithFileSchema(w http.ResponseWriter, r *http.Request) { fileSchemaTestClass := &FileSchemaTestClass{} if err := json.NewDecoder(r.Body).Decode(&fileSchemaTestClass); err != nil { w.WriteHeader(500) @@ -214,7 +214,7 @@ func (c *FakeApiController) TestBodyWithFileSchema(w http.ResponseWriter, r *htt } // TestBodyWithQueryParams - -func (c *FakeApiController) TestBodyWithQueryParams(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestBodyWithQueryParams(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() query := query.Get("query") user := &User{} @@ -233,7 +233,7 @@ func (c *FakeApiController) TestBodyWithQueryParams(w http.ResponseWriter, r *ht } // TestClientModel - To test \"client\" model -func (c *FakeApiController) TestClientModel(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestClientModel(w http.ResponseWriter, r *http.Request) { client := &Client{} if err := json.NewDecoder(r.Body).Decode(&client); err != nil { w.WriteHeader(500) @@ -250,7 +250,7 @@ func (c *FakeApiController) TestClientModel(w http.ResponseWriter, r *http.Reque } // TestEndpointParameters - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -func (c *FakeApiController) TestEndpointParameters(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestEndpointParameters(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -291,7 +291,7 @@ func (c *FakeApiController) TestEndpointParameters(w http.ResponseWriter, r *htt } // TestEnumParameters - To test enum parameters -func (c *FakeApiController) TestEnumParameters(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestEnumParameters(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -317,7 +317,7 @@ func (c *FakeApiController) TestEnumParameters(w http.ResponseWriter, r *http.Re } // TestGroupParameters - Fake endpoint to test group parameters (optional) -func (c *FakeApiController) TestGroupParameters(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestGroupParameters(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() requiredStringGroup := query.Get("requiredStringGroup") requiredBooleanGroup := r.Header.Get("requiredBooleanGroup") @@ -345,7 +345,7 @@ func (c *FakeApiController) TestGroupParameters(w http.ResponseWriter, r *http.R } // TestInlineAdditionalProperties - test inline additionalProperties -func (c *FakeApiController) TestInlineAdditionalProperties(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestInlineAdditionalProperties(w http.ResponseWriter, r *http.Request) { requestBody := &map[string]string{} if err := json.NewDecoder(r.Body).Decode(&requestBody); err != nil { w.WriteHeader(500) @@ -361,8 +361,8 @@ func (c *FakeApiController) TestInlineAdditionalProperties(w http.ResponseWriter EncodeJSONResponse(result, nil, w) } -// TestJsonFormData - test json serialization of form data -func (c *FakeApiController) TestJsonFormData(w http.ResponseWriter, r *http.Request) { +// TestJSONFormData - test json serialization of form data +func (c *FakeAPIController) TestJSONFormData(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -371,7 +371,7 @@ func (c *FakeApiController) TestJsonFormData(w http.ResponseWriter, r *http.Requ param := r.FormValue("param") param2 := r.FormValue("param2") - result, err := c.service.TestJsonFormData(param, param2) + result, err := c.service.TestJSONFormData(param, param2) if err != nil { w.WriteHeader(500) return @@ -381,14 +381,14 @@ func (c *FakeApiController) TestJsonFormData(w http.ResponseWriter, r *http.Requ } // TestQueryParameterCollectionFormat - -func (c *FakeApiController) TestQueryParameterCollectionFormat(w http.ResponseWriter, r *http.Request) { +func (c *FakeAPIController) TestQueryParameterCollectionFormat(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() pipe := strings.Split(query.Get("pipe"), ",") ioutil := strings.Split(query.Get("ioutil"), ",") - http := strings.Split(query.Get("http"), ",") - url := strings.Split(query.Get("url"), ",") + hTTP := strings.Split(query.Get("hTTP"), ",") + uRL := strings.Split(query.Get("uRL"), ",") context := strings.Split(query.Get("context"), ",") - result, err := c.service.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context) + result, err := c.service.TestQueryParameterCollectionFormat(pipe, ioutil, hTTP, uRL, context) if err != nil { w.WriteHeader(500) return diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go index 998465c23a4c..3cdc1863cdc7 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A FakeClassnameTags123ApiController binds http requests to an api service and writes the service results to the http response -type FakeClassnameTags123ApiController struct { - service FakeClassnameTags123ApiServicer +// A FakeClassnameTags123APIController binds http requests to an api service and writes the service results to the http response +type FakeClassnameTags123APIController struct { + service FakeClassnameTags123APIServicer } -// NewFakeClassnameTags123ApiController creates a default api controller -func NewFakeClassnameTags123ApiController(s FakeClassnameTags123ApiServicer) Router { - return &FakeClassnameTags123ApiController{ service: s } +// NewFakeClassnameTags123APIController creates a default api controller +func NewFakeClassnameTags123APIController(s FakeClassnameTags123APIServicer) Router { + return &FakeClassnameTags123APIController{ service: s } } -// Routes returns all of the api route for the FakeClassnameTags123ApiController -func (c *FakeClassnameTags123ApiController) Routes() Routes { +// Routes returns all of the api route for the FakeClassnameTags123APIController +func (c *FakeClassnameTags123APIController) Routes() Routes { return Routes{ { "TestClassname", @@ -40,7 +40,7 @@ func (c *FakeClassnameTags123ApiController) Routes() Routes { } // TestClassname - To test class name in snake case -func (c *FakeClassnameTags123ApiController) TestClassname(w http.ResponseWriter, r *http.Request) { +func (c *FakeClassnameTags123APIController) TestClassname(w http.ResponseWriter, r *http.Request) { client := &Client{} if err := json.NewDecoder(r.Body).Decode(&client); err != nil { w.WriteHeader(500) diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123_service.go new file mode 100644 index 000000000000..8efb2c43517d --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123_service.go @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" +) + +// FakeClassnameTags123APIService is a service that implents the logic for the FakeClassnameTags123APIServicer +// This service should implement the business logic for every endpoint for the FakeClassnameTags123API API. +// Include any external packages or services that will be required by this service. +type FakeClassnameTags123APIService struct { +} + +// NewFakeClassnameTags123APIService creates a default api service +func NewFakeClassnameTags123APIService() FakeClassnameTags123APIServicer { + return &FakeClassnameTags123APIService{} +} + +// TestClassname - To test class name in snake case +func (s *FakeClassnameTags123APIService) TestClassname(client Client) (interface{}, error) { + // TODO - update TestClassname with the required logic for this service method. + // Add api_fake_classname_tags123_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestClassname' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake_service.go new file mode 100644 index 000000000000..ec8a84d946ac --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake_service.go @@ -0,0 +1,124 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" + "os" +) + +// FakeAPIService is a service that implents the logic for the FakeAPIServicer +// This service should implement the business logic for every endpoint for the FakeAPI API. +// Include any external packages or services that will be required by this service. +type FakeAPIService struct { +} + +// NewFakeAPIService creates a default api service +func NewFakeAPIService() FakeAPIServicer { + return &FakeAPIService{} +} + +// FakeHealthGet - Health check endpoint +func (s *FakeAPIService) FakeHealthGet() (interface{}, error) { + // TODO - update FakeHealthGet with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FakeHealthGet' not implemented") +} + +// FakeOuterBooleanSerialize - +func (s *FakeAPIService) FakeOuterBooleanSerialize(body bool) (interface{}, error) { + // TODO - update FakeOuterBooleanSerialize with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FakeOuterBooleanSerialize' not implemented") +} + +// FakeOuterCompositeSerialize - +func (s *FakeAPIService) FakeOuterCompositeSerialize(outerComposite OuterComposite) (interface{}, error) { + // TODO - update FakeOuterCompositeSerialize with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FakeOuterCompositeSerialize' not implemented") +} + +// FakeOuterNumberSerialize - +func (s *FakeAPIService) FakeOuterNumberSerialize(body float32) (interface{}, error) { + // TODO - update FakeOuterNumberSerialize with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FakeOuterNumberSerialize' not implemented") +} + +// FakeOuterStringSerialize - +func (s *FakeAPIService) FakeOuterStringSerialize(body string) (interface{}, error) { + // TODO - update FakeOuterStringSerialize with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FakeOuterStringSerialize' not implemented") +} + +// TestBodyWithFileSchema - +func (s *FakeAPIService) TestBodyWithFileSchema(fileSchemaTestClass FileSchemaTestClass) (interface{}, error) { + // TODO - update TestBodyWithFileSchema with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestBodyWithFileSchema' not implemented") +} + +// TestBodyWithQueryParams - +func (s *FakeAPIService) TestBodyWithQueryParams(query string, user User) (interface{}, error) { + // TODO - update TestBodyWithQueryParams with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestBodyWithQueryParams' not implemented") +} + +// TestClientModel - To test \"client\" model +func (s *FakeAPIService) TestClientModel(client Client) (interface{}, error) { + // TODO - update TestClientModel with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestClientModel' not implemented") +} + +// TestEndpointParameters - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +func (s *FakeAPIService) TestEndpointParameters(number float32, double float64, patternWithoutDelimiter string, byte_ string, integer int32, int32_ int32, int64_ int64, float float32, string_ string, binary *os.File, date string, dateTime time.Time, password string, callback string) (interface{}, error) { + // TODO - update TestEndpointParameters with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestEndpointParameters' not implemented") +} + +// TestEnumParameters - To test enum parameters +func (s *FakeAPIService) TestEnumParameters(enumHeaderStringArray []string, enumHeaderString string, enumQueryStringArray []string, enumQueryString string, enumQueryInteger int32, enumQueryDouble float64, enumFormStringArray []string, enumFormString string) (interface{}, error) { + // TODO - update TestEnumParameters with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestEnumParameters' not implemented") +} + +// TestGroupParameters - Fake endpoint to test group parameters (optional) +func (s *FakeAPIService) TestGroupParameters(requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, stringGroup int32, booleanGroup bool, int64Group int64) (interface{}, error) { + // TODO - update TestGroupParameters with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestGroupParameters' not implemented") +} + +// TestInlineAdditionalProperties - test inline additionalProperties +func (s *FakeAPIService) TestInlineAdditionalProperties(requestBody map[string]string) (interface{}, error) { + // TODO - update TestInlineAdditionalProperties with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestInlineAdditionalProperties' not implemented") +} + +// TestJSONFormData - test json serialization of form data +func (s *FakeAPIService) TestJSONFormData(param string, param2 string) (interface{}, error) { + // TODO - update TestJSONFormData with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestJSONFormData' not implemented") +} + +// TestQueryParameterCollectionFormat - +func (s *FakeAPIService) TestQueryParameterCollectionFormat(pipe []string, ioutil []string, hTTP []string, uRL []string, context []string) (interface{}, error) { + // TODO - update TestQueryParameterCollectionFormat with the required logic for this service method. + // Add api_fake_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'TestQueryParameterCollectionFormat' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_pet.go b/samples/openapi3/server/petstore/go-api-server/go/api_pet.go index 867c12e08952..b343a292ad30 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_pet.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_pet.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A PetApiController binds http requests to an api service and writes the service results to the http response -type PetApiController struct { - service PetApiServicer +// A PetAPIController binds http requests to an api service and writes the service results to the http response +type PetAPIController struct { + service PetAPIServicer } -// NewPetApiController creates a default api controller -func NewPetApiController(s PetApiServicer) Router { - return &PetApiController{ service: s } +// NewPetAPIController creates a default api controller +func NewPetAPIController(s PetAPIServicer) Router { + return &PetAPIController{ service: s } } -// Routes returns all of the api route for the PetApiController -func (c *PetApiController) Routes() Routes { +// Routes returns all of the api route for the PetAPIController +func (c *PetAPIController) Routes() Routes { return Routes{ { "AddPet", @@ -55,10 +55,10 @@ func (c *PetApiController) Routes() Routes { c.FindPetsByTags, }, { - "GetPetById", + "GetPetByID", strings.ToUpper("Get"), "/v2/pet/{petId}", - c.GetPetById, + c.GetPetByID, }, { "UpdatePet", @@ -88,7 +88,7 @@ func (c *PetApiController) Routes() Routes { } // AddPet - Add a new pet to the store -func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) AddPet(w http.ResponseWriter, r *http.Request) { pet := &Pet{} if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { w.WriteHeader(500) @@ -105,16 +105,16 @@ func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { } // DeletePet - Deletes a pet -func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) DeletePet(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return } - apiKey := r.Header.Get("apiKey") - result, err := c.service.DeletePet(petId, apiKey) + aPIKey := r.Header.Get("aPIKey") + result, err := c.service.DeletePet(petID, aPIKey) if err != nil { w.WriteHeader(500) return @@ -124,7 +124,7 @@ func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { } // FindPetsByStatus - Finds Pets by status -func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() status := strings.Split(query.Get("status"), ",") result, err := c.service.FindPetsByStatus(status) @@ -137,7 +137,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque } // FindPetsByTags - Finds Pets by tags -func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() tags := strings.Split(query.Get("tags"), ",") result, err := c.service.FindPetsByTags(tags) @@ -149,16 +149,16 @@ func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } -// GetPetById - Find pet by ID -func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { +// GetPetByID - Find pet by ID +func (c *PetAPIController) GetPetByID(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return } - result, err := c.service.GetPetById(petId) + result, err := c.service.GetPetByID(petID) if err != nil { w.WriteHeader(500) return @@ -168,7 +168,7 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { } // UpdatePet - Update an existing pet -func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UpdatePet(w http.ResponseWriter, r *http.Request) { pet := &Pet{} if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { w.WriteHeader(500) @@ -185,7 +185,7 @@ func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { } // UpdatePetWithForm - Updates a pet in the store with form data -func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -193,7 +193,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ } params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return @@ -201,7 +201,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ name := r.FormValue("name") status := r.FormValue("status") - result, err := c.service.UpdatePetWithForm(petId, name, status) + result, err := c.service.UpdatePetWithForm(petID, name, status) if err != nil { w.WriteHeader(500) return @@ -211,7 +211,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ } // UploadFile - uploads an image -func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -219,7 +219,7 @@ func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { } params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return @@ -232,7 +232,7 @@ func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { return } - result, err := c.service.UploadFile(petId, additionalMetadata, file) + result, err := c.service.UploadFile(petID, additionalMetadata, file) if err != nil { w.WriteHeader(500) return @@ -242,7 +242,7 @@ func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { } // UploadFileWithRequiredFile - uploads an image (required) -func (c *PetApiController) UploadFileWithRequiredFile(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UploadFileWithRequiredFile(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -250,7 +250,7 @@ func (c *PetApiController) UploadFileWithRequiredFile(w http.ResponseWriter, r * } params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return @@ -263,7 +263,7 @@ func (c *PetApiController) UploadFileWithRequiredFile(w http.ResponseWriter, r * } additionalMetadata := r.FormValue("additionalMetadata") - result, err := c.service.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + result, err := c.service.UploadFileWithRequiredFile(petID, requiredFile, additionalMetadata) if err != nil { w.WriteHeader(500) return diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_pet_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_pet_service.go new file mode 100644 index 000000000000..b37d7802bec3 --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_pet_service.go @@ -0,0 +1,89 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" + "os" +) + +// PetAPIService is a service that implents the logic for the PetAPIServicer +// This service should implement the business logic for every endpoint for the PetAPI API. +// Include any external packages or services that will be required by this service. +type PetAPIService struct { +} + +// NewPetAPIService creates a default api service +func NewPetAPIService() PetAPIServicer { + return &PetAPIService{} +} + +// AddPet - Add a new pet to the store +func (s *PetAPIService) AddPet(pet Pet) (interface{}, error) { + // TODO - update AddPet with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'AddPet' not implemented") +} + +// DeletePet - Deletes a pet +func (s *PetAPIService) DeletePet(petID int64, aPIKey string) (interface{}, error) { + // TODO - update DeletePet with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'DeletePet' not implemented") +} + +// FindPetsByStatus - Finds Pets by status +func (s *PetAPIService) FindPetsByStatus(status []string) (interface{}, error) { + // TODO - update FindPetsByStatus with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FindPetsByStatus' not implemented") +} + +// FindPetsByTags - Finds Pets by tags +func (s *PetAPIService) FindPetsByTags(tags []string) (interface{}, error) { + // TODO - update FindPetsByTags with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'FindPetsByTags' not implemented") +} + +// GetPetByID - Find pet by ID +func (s *PetAPIService) GetPetByID(petID int64) (interface{}, error) { + // TODO - update GetPetByID with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'GetPetByID' not implemented") +} + +// UpdatePet - Update an existing pet +func (s *PetAPIService) UpdatePet(pet Pet) (interface{}, error) { + // TODO - update UpdatePet with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'UpdatePet' not implemented") +} + +// UpdatePetWithForm - Updates a pet in the store with form data +func (s *PetAPIService) UpdatePetWithForm(petID int64, name string, status string) (interface{}, error) { + // TODO - update UpdatePetWithForm with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'UpdatePetWithForm' not implemented") +} + +// UploadFile - uploads an image +func (s *PetAPIService) UploadFile(petID int64, additionalMetadata string, file *os.File) (interface{}, error) { + // TODO - update UploadFile with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'UploadFile' not implemented") +} + +// UploadFileWithRequiredFile - uploads an image (required) +func (s *PetAPIService) UploadFileWithRequiredFile(petID int64, requiredFile *os.File, additionalMetadata string) (interface{}, error) { + // TODO - update UploadFileWithRequiredFile with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'UploadFileWithRequiredFile' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_store.go b/samples/openapi3/server/petstore/go-api-server/go/api_store.go index 5867035964e5..3a7793135aac 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_store.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_store.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A StoreApiController binds http requests to an api service and writes the service results to the http response -type StoreApiController struct { - service StoreApiServicer +// A StoreAPIController binds http requests to an api service and writes the service results to the http response +type StoreAPIController struct { + service StoreAPIServicer } -// NewStoreApiController creates a default api controller -func NewStoreApiController(s StoreApiServicer) Router { - return &StoreApiController{ service: s } +// NewStoreAPIController creates a default api controller +func NewStoreAPIController(s StoreAPIServicer) Router { + return &StoreAPIController{ service: s } } -// Routes returns all of the api route for the StoreApiController -func (c *StoreApiController) Routes() Routes { +// Routes returns all of the api route for the StoreAPIController +func (c *StoreAPIController) Routes() Routes { return Routes{ { "DeleteOrder", @@ -43,10 +43,10 @@ func (c *StoreApiController) Routes() Routes { c.GetInventory, }, { - "GetOrderById", + "GetOrderByID", strings.ToUpper("Get"), "/v2/store/order/{order_id}", - c.GetOrderById, + c.GetOrderByID, }, { "PlaceOrder", @@ -58,10 +58,10 @@ func (c *StoreApiController) Routes() Routes { } // DeleteOrder - Delete purchase order by ID -func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) DeleteOrder(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - orderId := params["orderId"] - result, err := c.service.DeleteOrder(orderId) + orderID := params["orderID"] + result, err := c.service.DeleteOrder(orderID) if err != nil { w.WriteHeader(500) return @@ -71,7 +71,7 @@ func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) } // GetInventory - Returns pet inventories by status -func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) GetInventory(w http.ResponseWriter, r *http.Request) { result, err := c.service.GetInventory() if err != nil { w.WriteHeader(500) @@ -81,16 +81,16 @@ func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } -// GetOrderById - Find purchase order by ID -func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { +// GetOrderByID - Find purchase order by ID +func (c *StoreAPIController) GetOrderByID(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - orderId, err := parseIntParameter(params["orderId"]) + orderID, err := parseIntParameter(params["orderID"]) if err != nil { w.WriteHeader(500) return } - result, err := c.service.GetOrderById(orderId) + result, err := c.service.GetOrderByID(orderID) if err != nil { w.WriteHeader(500) return @@ -100,7 +100,7 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request } // PlaceOrder - Place an order for a pet -func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) PlaceOrder(w http.ResponseWriter, r *http.Request) { order := &Order{} if err := json.NewDecoder(r.Body).Decode(&order); err != nil { w.WriteHeader(500) diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_store_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_store_service.go new file mode 100644 index 000000000000..3a3881fc3dee --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_store_service.go @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" +) + +// StoreAPIService is a service that implents the logic for the StoreAPIServicer +// This service should implement the business logic for every endpoint for the StoreAPI API. +// Include any external packages or services that will be required by this service. +type StoreAPIService struct { +} + +// NewStoreAPIService creates a default api service +func NewStoreAPIService() StoreAPIServicer { + return &StoreAPIService{} +} + +// DeleteOrder - Delete purchase order by ID +func (s *StoreAPIService) DeleteOrder(orderID string) (interface{}, error) { + // TODO - update DeleteOrder with the required logic for this service method. + // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'DeleteOrder' not implemented") +} + +// GetInventory - Returns pet inventories by status +func (s *StoreAPIService) GetInventory() (interface{}, error) { + // TODO - update GetInventory with the required logic for this service method. + // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'GetInventory' not implemented") +} + +// GetOrderByID - Find purchase order by ID +func (s *StoreAPIService) GetOrderByID(orderID int64) (interface{}, error) { + // TODO - update GetOrderByID with the required logic for this service method. + // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'GetOrderByID' not implemented") +} + +// PlaceOrder - Place an order for a pet +func (s *StoreAPIService) PlaceOrder(order Order) (interface{}, error) { + // TODO - update PlaceOrder with the required logic for this service method. + // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'PlaceOrder' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_user.go b/samples/openapi3/server/petstore/go-api-server/go/api_user.go index 35fd6713eb71..67ff224697e8 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_user.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_user.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A UserApiController binds http requests to an api service and writes the service results to the http response -type UserApiController struct { - service UserApiServicer +// A UserAPIController binds http requests to an api service and writes the service results to the http response +type UserAPIController struct { + service UserAPIServicer } -// NewUserApiController creates a default api controller -func NewUserApiController(s UserApiServicer) Router { - return &UserApiController{ service: s } +// NewUserAPIController creates a default api controller +func NewUserAPIController(s UserAPIServicer) Router { + return &UserAPIController{ service: s } } -// Routes returns all of the api route for the UserApiController -func (c *UserApiController) Routes() Routes { +// Routes returns all of the api route for the UserAPIController +func (c *UserAPIController) Routes() Routes { return Routes{ { "CreateUser", @@ -82,7 +82,7 @@ func (c *UserApiController) Routes() Routes { } // CreateUser - Create user -func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUser(w http.ResponseWriter, r *http.Request) { user := &User{} if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) @@ -99,7 +99,7 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { } // CreateUsersWithArrayInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { user := &[]User{} if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) @@ -116,7 +116,7 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r * } // CreateUsersWithListInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { user := &[]User{} if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) @@ -133,7 +133,7 @@ func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *h } // DeleteUser - Delete user -func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] result, err := c.service.DeleteUser(username) @@ -146,7 +146,7 @@ func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { } // GetUserByName - Get user by user name -func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] result, err := c.service.GetUserByName(username) @@ -159,7 +159,7 @@ func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request } // LoginUser - Logs user into the system -func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() username := query.Get("username") password := query.Get("password") @@ -173,7 +173,7 @@ func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { } // LogoutUser - Logs out current logged in user session -func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) LogoutUser(w http.ResponseWriter, r *http.Request) { result, err := c.service.LogoutUser() if err != nil { w.WriteHeader(500) @@ -184,7 +184,7 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { } // UpdateUser - Updated user -func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) UpdateUser(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] user := &User{} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_user_service.go b/samples/openapi3/server/petstore/go-api-server/go/api_user_service.go new file mode 100644 index 000000000000..d0bfa1bfaa4a --- /dev/null +++ b/samples/openapi3/server/petstore/go-api-server/go/api_user_service.go @@ -0,0 +1,81 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + +import ( + "errors" +) + +// UserAPIService is a service that implents the logic for the UserAPIServicer +// This service should implement the business logic for every endpoint for the UserAPI API. +// Include any external packages or services that will be required by this service. +type UserAPIService struct { +} + +// NewUserAPIService creates a default api service +func NewUserAPIService() UserAPIServicer { + return &UserAPIService{} +} + +// CreateUser - Create user +func (s *UserAPIService) CreateUser(user User) (interface{}, error) { + // TODO - update CreateUser with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'CreateUser' not implemented") +} + +// CreateUsersWithArrayInput - Creates list of users with given input array +func (s *UserAPIService) CreateUsersWithArrayInput(user []User) (interface{}, error) { + // TODO - update CreateUsersWithArrayInput with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'CreateUsersWithArrayInput' not implemented") +} + +// CreateUsersWithListInput - Creates list of users with given input array +func (s *UserAPIService) CreateUsersWithListInput(user []User) (interface{}, error) { + // TODO - update CreateUsersWithListInput with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'CreateUsersWithListInput' not implemented") +} + +// DeleteUser - Delete user +func (s *UserAPIService) DeleteUser(username string) (interface{}, error) { + // TODO - update DeleteUser with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'DeleteUser' not implemented") +} + +// GetUserByName - Get user by user name +func (s *UserAPIService) GetUserByName(username string) (interface{}, error) { + // TODO - update GetUserByName with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'GetUserByName' not implemented") +} + +// LoginUser - Logs user into the system +func (s *UserAPIService) LoginUser(username string, password string) (interface{}, error) { + // TODO - update LoginUser with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'LoginUser' not implemented") +} + +// LogoutUser - Logs out current logged in user session +func (s *UserAPIService) LogoutUser() (interface{}, error) { + // TODO - update LogoutUser with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'LogoutUser' not implemented") +} + +// UpdateUser - Updated user +func (s *UserAPIService) UpdateUser(username string, user User) (interface{}, error) { + // TODO - update UpdateUser with the required logic for this service method. + // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'UpdateUser' not implemented") +} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go b/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go index 380b8dee0089..f7bee6e3e1b4 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go @@ -9,7 +9,7 @@ package petstoreserver -type ApiResponse struct { +type APIResponse struct { Code int32 `json:"code,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_category.go b/samples/openapi3/server/petstore/go-api-server/go/model_category.go index 373c419af559..c3f951db6b22 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_category.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_category.go @@ -11,7 +11,7 @@ package petstoreserver type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name"` } diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go index eaa3ce019a74..18683d27731a 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go @@ -38,7 +38,7 @@ type FormatTest struct { DateTime time.Time `json:"dateTime,omitempty"` - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` Password string `json:"password"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go index e25d32587cd5..ec0c553798e2 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go @@ -15,7 +15,7 @@ import ( type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` DateTime time.Time `json:"dateTime,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_order.go b/samples/openapi3/server/petstore/go-api-server/go/model_order.go index 6849a9f76d69..70cd6b6ded7e 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_order.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_order.go @@ -15,9 +15,9 @@ import ( type Order struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_pet.go b/samples/openapi3/server/petstore/go-api-server/go/model_pet.go index 2271730674e2..19f37a62502d 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_pet.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_pet.go @@ -11,13 +11,13 @@ package petstoreserver type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_tag.go b/samples/openapi3/server/petstore/go-api-server/go/model_tag.go index 29cd4d64ae35..56f3c928045d 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_tag.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_tag.go @@ -11,7 +11,7 @@ package petstoreserver type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_user.go b/samples/openapi3/server/petstore/go-api-server/go/model_user.go index 1eda4c6f763f..0c0bdc42879b 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_user.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_user.go @@ -11,7 +11,7 @@ package petstoreserver type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` diff --git a/samples/openapi3/server/petstore/go-api-server/main.go b/samples/openapi3/server/petstore/go-api-server/main.go index d4444720003b..d279a68b783e 100644 --- a/samples/openapi3/server/petstore/go-api-server/main.go +++ b/samples/openapi3/server/petstore/go-api-server/main.go @@ -19,28 +19,28 @@ import ( func main() { log.Printf("Server started") - AnotherFakeApiService := petstoreserver.NewAnotherFakeApiService() - AnotherFakeApiController := petstoreserver.NewAnotherFakeApiController(AnotherFakeApiService) + AnotherFakeAPIService := petstoreserver.NewAnotherFakeAPIService() + AnotherFakeAPIController := petstoreserver.NewAnotherFakeAPIController(AnotherFakeAPIService) - DefaultApiService := petstoreserver.NewDefaultApiService() - DefaultApiController := petstoreserver.NewDefaultApiController(DefaultApiService) + DefaultAPIService := petstoreserver.NewDefaultAPIService() + DefaultAPIController := petstoreserver.NewDefaultAPIController(DefaultAPIService) - FakeApiService := petstoreserver.NewFakeApiService() - FakeApiController := petstoreserver.NewFakeApiController(FakeApiService) + FakeAPIService := petstoreserver.NewFakeAPIService() + FakeAPIController := petstoreserver.NewFakeAPIController(FakeAPIService) - FakeClassnameTags123ApiService := petstoreserver.NewFakeClassnameTags123ApiService() - FakeClassnameTags123ApiController := petstoreserver.NewFakeClassnameTags123ApiController(FakeClassnameTags123ApiService) + FakeClassnameTags123APIService := petstoreserver.NewFakeClassnameTags123APIService() + FakeClassnameTags123APIController := petstoreserver.NewFakeClassnameTags123APIController(FakeClassnameTags123APIService) - PetApiService := petstoreserver.NewPetApiService() - PetApiController := petstoreserver.NewPetApiController(PetApiService) + PetAPIService := petstoreserver.NewPetAPIService() + PetAPIController := petstoreserver.NewPetAPIController(PetAPIService) - StoreApiService := petstoreserver.NewStoreApiService() - StoreApiController := petstoreserver.NewStoreApiController(StoreApiService) + StoreAPIService := petstoreserver.NewStoreAPIService() + StoreAPIController := petstoreserver.NewStoreAPIController(StoreAPIService) - UserApiService := petstoreserver.NewUserApiService() - UserApiController := petstoreserver.NewUserApiController(UserApiService) + UserAPIService := petstoreserver.NewUserAPIService() + UserAPIController := petstoreserver.NewUserAPIController(UserAPIService) - router := petstoreserver.NewRouter(AnotherFakeApiController, DefaultApiController, FakeApiController, FakeClassnameTags123ApiController, PetApiController, StoreApiController, UserApiController) + router := petstoreserver.NewRouter(AnotherFakeAPIController, DefaultAPIController, FakeAPIController, FakeClassnameTags123APIController, PetAPIController, StoreAPIController, UserAPIController) log.Fatal(http.ListenAndServe(":8080", router)) } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go index 17107d021c5c..3aabb062cdd8 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go @@ -75,8 +75,8 @@ func TestInlineAdditionalProperties(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// TestJsonFormData - test json serialization of form data -func TestJsonFormData(c *gin.Context) { +// TestJSONFormData - test json serialization of form data +func TestJSONFormData(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go index a24a7d2e5e21..b68b69693e45 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go @@ -35,8 +35,8 @@ func FindPetsByTags(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// GetPetById - Find pet by ID -func GetPetById(c *gin.Context) { +// GetPetByID - Find pet by ID +func GetPetByID(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go index fd95d3d9541c..2bf400808376 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go @@ -25,8 +25,8 @@ func GetInventory(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// GetOrderById - Find purchase order by ID -func GetOrderById(c *gin.Context) { +// GetOrderByID - Find purchase order by ID +func GetOrderByID(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go index 380b8dee0089..f7bee6e3e1b4 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go @@ -9,7 +9,7 @@ package petstoreserver -type ApiResponse struct { +type APIResponse struct { Code int32 `json:"code,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go index 373c419af559..c3f951db6b22 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go @@ -11,7 +11,7 @@ package petstoreserver type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go index eaa3ce019a74..18683d27731a 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go @@ -38,7 +38,7 @@ type FormatTest struct { DateTime time.Time `json:"dateTime,omitempty"` - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` Password string `json:"password"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go index e25d32587cd5..ec0c553798e2 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go @@ -15,7 +15,7 @@ import ( type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty"` + UUID string `json:"uuid,omitempty"` DateTime time.Time `json:"dateTime,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go index 6849a9f76d69..70cd6b6ded7e 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go @@ -15,9 +15,9 @@ import ( type Order struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go index 2271730674e2..19f37a62502d 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go @@ -11,13 +11,13 @@ package petstoreserver type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go index 29cd4d64ae35..56f3c928045d 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go @@ -11,7 +11,7 @@ package petstoreserver type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go index 1eda4c6f763f..0c0bdc42879b 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go @@ -11,7 +11,7 @@ package petstoreserver type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go index 4d05d282f980..e4f8a18e1e52 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go @@ -161,10 +161,10 @@ var routes = Routes{ }, { - "TestJsonFormData", + "TestJSONFormData", http.MethodGet, "/v2/fake/jsonFormData", - TestJsonFormData, + TestJSONFormData, }, { @@ -210,10 +210,10 @@ var routes = Routes{ }, { - "GetPetById", + "GetPetByID", http.MethodGet, "/v2/pet/:petId", - GetPetById, + GetPetByID, }, { @@ -259,10 +259,10 @@ var routes = Routes{ }, { - "GetOrderById", + "GetOrderByID", http.MethodGet, "/v2/store/order/:order_id", - GetOrderById, + GetOrderByID, }, { diff --git a/samples/server/petstore/go-api-server/go/api.go b/samples/server/petstore/go-api-server/go/api.go index c0b06830872b..cd74862dda88 100644 --- a/samples/server/petstore/go-api-server/go/api.go +++ b/samples/server/petstore/go-api-server/go/api.go @@ -15,32 +15,32 @@ import ( ) -// PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi -// The PetApiRouter implementation should parse necessary information from the http request, -// pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. -type PetApiRouter interface { +// PetAPIRouter defines the required methods for binding the api requests to a responses for the PetAPI +// The PetAPIRouter implementation should parse necessary information from the http request, +// pass the data to a PetAPIServicer to perform the required actions, then write the service results to the http response. +type PetAPIRouter interface { AddPet(http.ResponseWriter, *http.Request) DeletePet(http.ResponseWriter, *http.Request) FindPetsByStatus(http.ResponseWriter, *http.Request) FindPetsByTags(http.ResponseWriter, *http.Request) - GetPetById(http.ResponseWriter, *http.Request) + GetPetByID(http.ResponseWriter, *http.Request) UpdatePet(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request) } -// StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi -// The StoreApiRouter implementation should parse necessary information from the http request, -// pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. -type StoreApiRouter interface { +// StoreAPIRouter defines the required methods for binding the api requests to a responses for the StoreAPI +// The StoreAPIRouter implementation should parse necessary information from the http request, +// pass the data to a StoreAPIServicer to perform the required actions, then write the service results to the http response. +type StoreAPIRouter interface { DeleteOrder(http.ResponseWriter, *http.Request) GetInventory(http.ResponseWriter, *http.Request) - GetOrderById(http.ResponseWriter, *http.Request) + GetOrderByID(http.ResponseWriter, *http.Request) PlaceOrder(http.ResponseWriter, *http.Request) } -// UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi -// The UserApiRouter implementation should parse necessary information from the http request, -// pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. -type UserApiRouter interface { +// UserAPIRouter defines the required methods for binding the api requests to a responses for the UserAPI +// The UserAPIRouter implementation should parse necessary information from the http request, +// pass the data to a UserAPIServicer to perform the required actions, then write the service results to the http response. +type UserAPIRouter interface { CreateUser(http.ResponseWriter, *http.Request) CreateUsersWithArrayInput(http.ResponseWriter, *http.Request) CreateUsersWithListInput(http.ResponseWriter, *http.Request) @@ -52,39 +52,39 @@ type UserApiRouter interface { } -// PetApiServicer defines the api actions for the PetApi service +// PetAPIServicer defines the api actions for the PetAPI service // This interface intended to stay up to date with the openapi yaml used to generate it, // while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. -type PetApiServicer interface { +type PetAPIServicer interface { AddPet(Pet) (interface{}, error) DeletePet(int64, string) (interface{}, error) FindPetsByStatus([]string) (interface{}, error) FindPetsByTags([]string) (interface{}, error) - GetPetById(int64) (interface{}, error) + GetPetByID(int64) (interface{}, error) UpdatePet(Pet) (interface{}, error) UpdatePetWithForm(int64, string, string) (interface{}, error) UploadFile(int64, string, *os.File) (interface{}, error) } -// StoreApiServicer defines the api actions for the StoreApi service +// StoreAPIServicer defines the api actions for the StoreAPI service // This interface intended to stay up to date with the openapi yaml used to generate it, // while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. -type StoreApiServicer interface { +type StoreAPIServicer interface { DeleteOrder(string) (interface{}, error) GetInventory() (interface{}, error) - GetOrderById(int64) (interface{}, error) + GetOrderByID(int64) (interface{}, error) PlaceOrder(Order) (interface{}, error) } -// UserApiServicer defines the api actions for the UserApi service +// UserAPIServicer defines the api actions for the UserAPI service // This interface intended to stay up to date with the openapi yaml used to generate it, // while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. -type UserApiServicer interface { +type UserAPIServicer interface { CreateUser(User) (interface{}, error) CreateUsersWithArrayInput([]User) (interface{}, error) CreateUsersWithListInput([]User) (interface{}, error) diff --git a/samples/server/petstore/go-api-server/go/api_pet.go b/samples/server/petstore/go-api-server/go/api_pet.go index f5275ecbef31..c1b3120ae0fa 100644 --- a/samples/server/petstore/go-api-server/go/api_pet.go +++ b/samples/server/petstore/go-api-server/go/api_pet.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A PetApiController binds http requests to an api service and writes the service results to the http response -type PetApiController struct { - service PetApiServicer +// A PetAPIController binds http requests to an api service and writes the service results to the http response +type PetAPIController struct { + service PetAPIServicer } -// NewPetApiController creates a default api controller -func NewPetApiController(s PetApiServicer) Router { - return &PetApiController{ service: s } +// NewPetAPIController creates a default api controller +func NewPetAPIController(s PetAPIServicer) Router { + return &PetAPIController{ service: s } } -// Routes returns all of the api route for the PetApiController -func (c *PetApiController) Routes() Routes { +// Routes returns all of the api route for the PetAPIController +func (c *PetAPIController) Routes() Routes { return Routes{ { "AddPet", @@ -55,10 +55,10 @@ func (c *PetApiController) Routes() Routes { c.FindPetsByTags, }, { - "GetPetById", + "GetPetByID", strings.ToUpper("Get"), "/v2/pet/{petId}", - c.GetPetById, + c.GetPetByID, }, { "UpdatePet", @@ -82,7 +82,7 @@ func (c *PetApiController) Routes() Routes { } // AddPet - Add a new pet to the store -func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) AddPet(w http.ResponseWriter, r *http.Request) { body := &Pet{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -99,16 +99,16 @@ func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { } // DeletePet - Deletes a pet -func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) DeletePet(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return } - apiKey := r.Header.Get("apiKey") - result, err := c.service.DeletePet(petId, apiKey) + aPIKey := r.Header.Get("aPIKey") + result, err := c.service.DeletePet(petID, aPIKey) if err != nil { w.WriteHeader(500) return @@ -118,7 +118,7 @@ func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { } // FindPetsByStatus - Finds Pets by status -func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() status := strings.Split(query.Get("status"), ",") result, err := c.service.FindPetsByStatus(status) @@ -131,7 +131,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque } // FindPetsByTags - Finds Pets by tags -func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() tags := strings.Split(query.Get("tags"), ",") result, err := c.service.FindPetsByTags(tags) @@ -143,16 +143,16 @@ func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } -// GetPetById - Find pet by ID -func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { +// GetPetByID - Find pet by ID +func (c *PetAPIController) GetPetByID(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return } - result, err := c.service.GetPetById(petId) + result, err := c.service.GetPetByID(petID) if err != nil { w.WriteHeader(500) return @@ -162,7 +162,7 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { } // UpdatePet - Update an existing pet -func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UpdatePet(w http.ResponseWriter, r *http.Request) { body := &Pet{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -179,7 +179,7 @@ func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { } // UpdatePetWithForm - Updates a pet in the store with form data -func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -187,7 +187,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ } params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return @@ -195,7 +195,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ name := r.FormValue("name") status := r.FormValue("status") - result, err := c.service.UpdatePetWithForm(petId, name, status) + result, err := c.service.UpdatePetWithForm(petID, name, status) if err != nil { w.WriteHeader(500) return @@ -205,7 +205,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ } // UploadFile - uploads an image -func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { +func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { w.WriteHeader(500) @@ -213,7 +213,7 @@ func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { } params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) + petID, err := parseIntParameter(params["petID"]) if err != nil { w.WriteHeader(500) return @@ -226,7 +226,7 @@ func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { return } - result, err := c.service.UploadFile(petId, additionalMetadata, file) + result, err := c.service.UploadFile(petID, additionalMetadata, file) if err != nil { w.WriteHeader(500) return diff --git a/samples/server/petstore/go-api-server/go/api_pet_service.go b/samples/server/petstore/go-api-server/go/api_pet_service.go index 815eac5c7a90..85bc12829275 100644 --- a/samples/server/petstore/go-api-server/go/api_pet_service.go +++ b/samples/server/petstore/go-api-server/go/api_pet_service.go @@ -14,68 +14,68 @@ import ( "os" ) -// PetApiService is a service that implents the logic for the PetApiServicer -// This service should implement the business logic for every endpoint for the PetApi API. +// PetAPIService is a service that implents the logic for the PetAPIServicer +// This service should implement the business logic for every endpoint for the PetAPI API. // Include any external packages or services that will be required by this service. -type PetApiService struct { +type PetAPIService struct { } -// NewPetApiService creates a default api service -func NewPetApiService() PetApiServicer { - return &PetApiService{} +// NewPetAPIService creates a default api service +func NewPetAPIService() PetAPIServicer { + return &PetAPIService{} } // AddPet - Add a new pet to the store -func (s *PetApiService) AddPet(body Pet) (interface{}, error) { +func (s *PetAPIService) AddPet(body Pet) (interface{}, error) { // TODO - update AddPet with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'AddPet' not implemented") } // DeletePet - Deletes a pet -func (s *PetApiService) DeletePet(petId int64, apiKey string) (interface{}, error) { +func (s *PetAPIService) DeletePet(petID int64, aPIKey string) (interface{}, error) { // TODO - update DeletePet with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'DeletePet' not implemented") } // FindPetsByStatus - Finds Pets by status -func (s *PetApiService) FindPetsByStatus(status []string) (interface{}, error) { +func (s *PetAPIService) FindPetsByStatus(status []string) (interface{}, error) { // TODO - update FindPetsByStatus with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'FindPetsByStatus' not implemented") } // FindPetsByTags - Finds Pets by tags -func (s *PetApiService) FindPetsByTags(tags []string) (interface{}, error) { +func (s *PetAPIService) FindPetsByTags(tags []string) (interface{}, error) { // TODO - update FindPetsByTags with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'FindPetsByTags' not implemented") } -// GetPetById - Find pet by ID -func (s *PetApiService) GetPetById(petId int64) (interface{}, error) { - // TODO - update GetPetById with the required logic for this service method. +// GetPetByID - Find pet by ID +func (s *PetAPIService) GetPetByID(petID int64) (interface{}, error) { + // TODO - update GetPetByID with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. - return nil, errors.New("service method 'GetPetById' not implemented") + return nil, errors.New("service method 'GetPetByID' not implemented") } // UpdatePet - Update an existing pet -func (s *PetApiService) UpdatePet(body Pet) (interface{}, error) { +func (s *PetAPIService) UpdatePet(body Pet) (interface{}, error) { // TODO - update UpdatePet with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UpdatePet' not implemented") } // UpdatePetWithForm - Updates a pet in the store with form data -func (s *PetApiService) UpdatePetWithForm(petId int64, name string, status string) (interface{}, error) { +func (s *PetAPIService) UpdatePetWithForm(petID int64, name string, status string) (interface{}, error) { // TODO - update UpdatePetWithForm with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UpdatePetWithForm' not implemented") } // UploadFile - uploads an image -func (s *PetApiService) UploadFile(petId int64, additionalMetadata string, file *os.File) (interface{}, error) { +func (s *PetAPIService) UploadFile(petID int64, additionalMetadata string, file *os.File) (interface{}, error) { // TODO - update UploadFile with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UploadFile' not implemented") diff --git a/samples/server/petstore/go-api-server/go/api_store.go b/samples/server/petstore/go-api-server/go/api_store.go index fc9da3c0ee54..0923b7af346a 100644 --- a/samples/server/petstore/go-api-server/go/api_store.go +++ b/samples/server/petstore/go-api-server/go/api_store.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A StoreApiController binds http requests to an api service and writes the service results to the http response -type StoreApiController struct { - service StoreApiServicer +// A StoreAPIController binds http requests to an api service and writes the service results to the http response +type StoreAPIController struct { + service StoreAPIServicer } -// NewStoreApiController creates a default api controller -func NewStoreApiController(s StoreApiServicer) Router { - return &StoreApiController{ service: s } +// NewStoreAPIController creates a default api controller +func NewStoreAPIController(s StoreAPIServicer) Router { + return &StoreAPIController{ service: s } } -// Routes returns all of the api route for the StoreApiController -func (c *StoreApiController) Routes() Routes { +// Routes returns all of the api route for the StoreAPIController +func (c *StoreAPIController) Routes() Routes { return Routes{ { "DeleteOrder", @@ -43,10 +43,10 @@ func (c *StoreApiController) Routes() Routes { c.GetInventory, }, { - "GetOrderById", + "GetOrderByID", strings.ToUpper("Get"), "/v2/store/order/{orderId}", - c.GetOrderById, + c.GetOrderByID, }, { "PlaceOrder", @@ -58,10 +58,10 @@ func (c *StoreApiController) Routes() Routes { } // DeleteOrder - Delete purchase order by ID -func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) DeleteOrder(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - orderId := params["orderId"] - result, err := c.service.DeleteOrder(orderId) + orderID := params["orderID"] + result, err := c.service.DeleteOrder(orderID) if err != nil { w.WriteHeader(500) return @@ -71,7 +71,7 @@ func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) } // GetInventory - Returns pet inventories by status -func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) GetInventory(w http.ResponseWriter, r *http.Request) { result, err := c.service.GetInventory() if err != nil { w.WriteHeader(500) @@ -81,16 +81,16 @@ func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } -// GetOrderById - Find purchase order by ID -func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { +// GetOrderByID - Find purchase order by ID +func (c *StoreAPIController) GetOrderByID(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) - orderId, err := parseIntParameter(params["orderId"]) + orderID, err := parseIntParameter(params["orderID"]) if err != nil { w.WriteHeader(500) return } - result, err := c.service.GetOrderById(orderId) + result, err := c.service.GetOrderByID(orderID) if err != nil { w.WriteHeader(500) return @@ -100,7 +100,7 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request } // PlaceOrder - Place an order for a pet -func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { +func (c *StoreAPIController) PlaceOrder(w http.ResponseWriter, r *http.Request) { body := &Order{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) diff --git a/samples/server/petstore/go-api-server/go/api_store_service.go b/samples/server/petstore/go-api-server/go/api_store_service.go index 749c12cf8526..c37885b49665 100644 --- a/samples/server/petstore/go-api-server/go/api_store_service.go +++ b/samples/server/petstore/go-api-server/go/api_store_service.go @@ -13,40 +13,40 @@ import ( "errors" ) -// StoreApiService is a service that implents the logic for the StoreApiServicer -// This service should implement the business logic for every endpoint for the StoreApi API. +// StoreAPIService is a service that implents the logic for the StoreAPIServicer +// This service should implement the business logic for every endpoint for the StoreAPI API. // Include any external packages or services that will be required by this service. -type StoreApiService struct { +type StoreAPIService struct { } -// NewStoreApiService creates a default api service -func NewStoreApiService() StoreApiServicer { - return &StoreApiService{} +// NewStoreAPIService creates a default api service +func NewStoreAPIService() StoreAPIServicer { + return &StoreAPIService{} } // DeleteOrder - Delete purchase order by ID -func (s *StoreApiService) DeleteOrder(orderId string) (interface{}, error) { +func (s *StoreAPIService) DeleteOrder(orderID string) (interface{}, error) { // TODO - update DeleteOrder with the required logic for this service method. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'DeleteOrder' not implemented") } // GetInventory - Returns pet inventories by status -func (s *StoreApiService) GetInventory() (interface{}, error) { +func (s *StoreAPIService) GetInventory() (interface{}, error) { // TODO - update GetInventory with the required logic for this service method. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'GetInventory' not implemented") } -// GetOrderById - Find purchase order by ID -func (s *StoreApiService) GetOrderById(orderId int64) (interface{}, error) { - // TODO - update GetOrderById with the required logic for this service method. +// GetOrderByID - Find purchase order by ID +func (s *StoreAPIService) GetOrderByID(orderID int64) (interface{}, error) { + // TODO - update GetOrderByID with the required logic for this service method. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. - return nil, errors.New("service method 'GetOrderById' not implemented") + return nil, errors.New("service method 'GetOrderByID' not implemented") } // PlaceOrder - Place an order for a pet -func (s *StoreApiService) PlaceOrder(body Order) (interface{}, error) { +func (s *StoreAPIService) PlaceOrder(body Order) (interface{}, error) { // TODO - update PlaceOrder with the required logic for this service method. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'PlaceOrder' not implemented") diff --git a/samples/server/petstore/go-api-server/go/api_user.go b/samples/server/petstore/go-api-server/go/api_user.go index a6618b9d62db..441b58159984 100644 --- a/samples/server/petstore/go-api-server/go/api_user.go +++ b/samples/server/petstore/go-api-server/go/api_user.go @@ -17,18 +17,18 @@ import ( "github.com/gorilla/mux" ) -// A UserApiController binds http requests to an api service and writes the service results to the http response -type UserApiController struct { - service UserApiServicer +// A UserAPIController binds http requests to an api service and writes the service results to the http response +type UserAPIController struct { + service UserAPIServicer } -// NewUserApiController creates a default api controller -func NewUserApiController(s UserApiServicer) Router { - return &UserApiController{ service: s } +// NewUserAPIController creates a default api controller +func NewUserAPIController(s UserAPIServicer) Router { + return &UserAPIController{ service: s } } -// Routes returns all of the api route for the UserApiController -func (c *UserApiController) Routes() Routes { +// Routes returns all of the api route for the UserAPIController +func (c *UserAPIController) Routes() Routes { return Routes{ { "CreateUser", @@ -82,7 +82,7 @@ func (c *UserApiController) Routes() Routes { } // CreateUser - Create user -func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUser(w http.ResponseWriter, r *http.Request) { body := &User{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -99,7 +99,7 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { } // CreateUsersWithArrayInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { body := &[]User{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -116,7 +116,7 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r * } // CreateUsersWithListInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { body := &[]User{} if err := json.NewDecoder(r.Body).Decode(&body); err != nil { w.WriteHeader(500) @@ -133,7 +133,7 @@ func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *h } // DeleteUser - Delete user -func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] result, err := c.service.DeleteUser(username) @@ -146,7 +146,7 @@ func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { } // GetUserByName - Get user by user name -func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] result, err := c.service.GetUserByName(username) @@ -159,7 +159,7 @@ func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request } // LoginUser - Logs user into the system -func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() username := query.Get("username") password := query.Get("password") @@ -173,7 +173,7 @@ func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { } // LogoutUser - Logs out current logged in user session -func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) LogoutUser(w http.ResponseWriter, r *http.Request) { result, err := c.service.LogoutUser() if err != nil { w.WriteHeader(500) @@ -184,7 +184,7 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { } // UpdateUser - Updated user -func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { +func (c *UserAPIController) UpdateUser(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] body := &User{} diff --git a/samples/server/petstore/go-api-server/go/api_user_service.go b/samples/server/petstore/go-api-server/go/api_user_service.go index 1136ac01129e..e331dbb468c6 100644 --- a/samples/server/petstore/go-api-server/go/api_user_service.go +++ b/samples/server/petstore/go-api-server/go/api_user_service.go @@ -13,68 +13,68 @@ import ( "errors" ) -// UserApiService is a service that implents the logic for the UserApiServicer -// This service should implement the business logic for every endpoint for the UserApi API. +// UserAPIService is a service that implents the logic for the UserAPIServicer +// This service should implement the business logic for every endpoint for the UserAPI API. // Include any external packages or services that will be required by this service. -type UserApiService struct { +type UserAPIService struct { } -// NewUserApiService creates a default api service -func NewUserApiService() UserApiServicer { - return &UserApiService{} +// NewUserAPIService creates a default api service +func NewUserAPIService() UserAPIServicer { + return &UserAPIService{} } // CreateUser - Create user -func (s *UserApiService) CreateUser(body User) (interface{}, error) { +func (s *UserAPIService) CreateUser(body User) (interface{}, error) { // TODO - update CreateUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUser' not implemented") } // CreateUsersWithArrayInput - Creates list of users with given input array -func (s *UserApiService) CreateUsersWithArrayInput(body []User) (interface{}, error) { +func (s *UserAPIService) CreateUsersWithArrayInput(body []User) (interface{}, error) { // TODO - update CreateUsersWithArrayInput with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUsersWithArrayInput' not implemented") } // CreateUsersWithListInput - Creates list of users with given input array -func (s *UserApiService) CreateUsersWithListInput(body []User) (interface{}, error) { +func (s *UserAPIService) CreateUsersWithListInput(body []User) (interface{}, error) { // TODO - update CreateUsersWithListInput with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUsersWithListInput' not implemented") } // DeleteUser - Delete user -func (s *UserApiService) DeleteUser(username string) (interface{}, error) { +func (s *UserAPIService) DeleteUser(username string) (interface{}, error) { // TODO - update DeleteUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'DeleteUser' not implemented") } // GetUserByName - Get user by user name -func (s *UserApiService) GetUserByName(username string) (interface{}, error) { +func (s *UserAPIService) GetUserByName(username string) (interface{}, error) { // TODO - update GetUserByName with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'GetUserByName' not implemented") } // LoginUser - Logs user into the system -func (s *UserApiService) LoginUser(username string, password string) (interface{}, error) { +func (s *UserAPIService) LoginUser(username string, password string) (interface{}, error) { // TODO - update LoginUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'LoginUser' not implemented") } // LogoutUser - Logs out current logged in user session -func (s *UserApiService) LogoutUser() (interface{}, error) { +func (s *UserAPIService) LogoutUser() (interface{}, error) { // TODO - update LogoutUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'LogoutUser' not implemented") } // UpdateUser - Updated user -func (s *UserApiService) UpdateUser(username string, body User) (interface{}, error) { +func (s *UserAPIService) UpdateUser(username string, body User) (interface{}, error) { // TODO - update UpdateUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UpdateUser' not implemented") diff --git a/samples/server/petstore/go-api-server/go/model_api_response.go b/samples/server/petstore/go-api-server/go/model_api_response.go index 2379e169080d..dc7e45cf2fe2 100644 --- a/samples/server/petstore/go-api-server/go/model_api_response.go +++ b/samples/server/petstore/go-api-server/go/model_api_response.go @@ -9,8 +9,8 @@ package petstoreserver -// ApiResponse - Describes the result of uploading an image resource -type ApiResponse struct { +// APIResponse - Describes the result of uploading an image resource +type APIResponse struct { Code int32 `json:"code,omitempty"` diff --git a/samples/server/petstore/go-api-server/go/model_category.go b/samples/server/petstore/go-api-server/go/model_category.go index 5e6f9d247fa4..39b89e43cc3f 100644 --- a/samples/server/petstore/go-api-server/go/model_category.go +++ b/samples/server/petstore/go-api-server/go/model_category.go @@ -12,7 +12,7 @@ package petstoreserver // Category - A category for a pet type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/server/petstore/go-api-server/go/model_order.go b/samples/server/petstore/go-api-server/go/model_order.go index a9d8dbb79579..965e2043819b 100644 --- a/samples/server/petstore/go-api-server/go/model_order.go +++ b/samples/server/petstore/go-api-server/go/model_order.go @@ -16,9 +16,9 @@ import ( // Order - An order for a pets from the pet store type Order struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` diff --git a/samples/server/petstore/go-api-server/go/model_pet.go b/samples/server/petstore/go-api-server/go/model_pet.go index fb206487ab08..5b458f652ba2 100644 --- a/samples/server/petstore/go-api-server/go/model_pet.go +++ b/samples/server/petstore/go-api-server/go/model_pet.go @@ -12,13 +12,13 @@ package petstoreserver // Pet - A pet for sale in the pet store type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` diff --git a/samples/server/petstore/go-api-server/go/model_tag.go b/samples/server/petstore/go-api-server/go/model_tag.go index 2fb07fb32c46..64ba94ae1079 100644 --- a/samples/server/petstore/go-api-server/go/model_tag.go +++ b/samples/server/petstore/go-api-server/go/model_tag.go @@ -12,7 +12,7 @@ package petstoreserver // Tag - A tag for a pet type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/server/petstore/go-api-server/go/model_user.go b/samples/server/petstore/go-api-server/go/model_user.go index 8f40d0ac04cb..c0e66b106cb1 100644 --- a/samples/server/petstore/go-api-server/go/model_user.go +++ b/samples/server/petstore/go-api-server/go/model_user.go @@ -12,7 +12,7 @@ package petstoreserver // User - A User who is purchasing from the pet store type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` diff --git a/samples/server/petstore/go-api-server/main.go b/samples/server/petstore/go-api-server/main.go index ddc5258297ca..c3153dbd8f94 100644 --- a/samples/server/petstore/go-api-server/main.go +++ b/samples/server/petstore/go-api-server/main.go @@ -19,16 +19,16 @@ import ( func main() { log.Printf("Server started") - PetApiService := petstoreserver.NewPetApiService() - PetApiController := petstoreserver.NewPetApiController(PetApiService) + PetAPIService := petstoreserver.NewPetAPIService() + PetAPIController := petstoreserver.NewPetAPIController(PetAPIService) - StoreApiService := petstoreserver.NewStoreApiService() - StoreApiController := petstoreserver.NewStoreApiController(StoreApiService) + StoreAPIService := petstoreserver.NewStoreAPIService() + StoreAPIController := petstoreserver.NewStoreAPIController(StoreAPIService) - UserApiService := petstoreserver.NewUserApiService() - UserApiController := petstoreserver.NewUserApiController(UserApiService) + UserAPIService := petstoreserver.NewUserAPIService() + UserAPIController := petstoreserver.NewUserAPIController(UserAPIService) - router := petstoreserver.NewRouter(PetApiController, StoreApiController, UserApiController) + router := petstoreserver.NewRouter(PetAPIController, StoreAPIController, UserAPIController) log.Fatal(http.ListenAndServe(":8080", router)) } diff --git a/samples/server/petstore/go-gin-api-server/go/api_pet.go b/samples/server/petstore/go-gin-api-server/go/api_pet.go index 851a3ef5e885..a9736b4ba3ed 100644 --- a/samples/server/petstore/go-gin-api-server/go/api_pet.go +++ b/samples/server/petstore/go-gin-api-server/go/api_pet.go @@ -35,8 +35,8 @@ func FindPetsByTags(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// GetPetById - Find pet by ID -func GetPetById(c *gin.Context) { +// GetPetByID - Find pet by ID +func GetPetByID(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } diff --git a/samples/server/petstore/go-gin-api-server/go/api_store.go b/samples/server/petstore/go-gin-api-server/go/api_store.go index 565a2a2336d5..715ea3745767 100644 --- a/samples/server/petstore/go-gin-api-server/go/api_store.go +++ b/samples/server/petstore/go-gin-api-server/go/api_store.go @@ -25,8 +25,8 @@ func GetInventory(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// GetOrderById - Find purchase order by ID -func GetOrderById(c *gin.Context) { +// GetOrderByID - Find purchase order by ID +func GetOrderByID(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } diff --git a/samples/server/petstore/go-gin-api-server/go/model_api_response.go b/samples/server/petstore/go-gin-api-server/go/model_api_response.go index 2379e169080d..dc7e45cf2fe2 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_api_response.go +++ b/samples/server/petstore/go-gin-api-server/go/model_api_response.go @@ -9,8 +9,8 @@ package petstoreserver -// ApiResponse - Describes the result of uploading an image resource -type ApiResponse struct { +// APIResponse - Describes the result of uploading an image resource +type APIResponse struct { Code int32 `json:"code,omitempty"` diff --git a/samples/server/petstore/go-gin-api-server/go/model_category.go b/samples/server/petstore/go-gin-api-server/go/model_category.go index 5e6f9d247fa4..39b89e43cc3f 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_category.go +++ b/samples/server/petstore/go-gin-api-server/go/model_category.go @@ -12,7 +12,7 @@ package petstoreserver // Category - A category for a pet type Category struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/server/petstore/go-gin-api-server/go/model_order.go b/samples/server/petstore/go-gin-api-server/go/model_order.go index a9d8dbb79579..965e2043819b 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_order.go +++ b/samples/server/petstore/go-gin-api-server/go/model_order.go @@ -16,9 +16,9 @@ import ( // Order - An order for a pets from the pet store type Order struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` + PetID int64 `json:"petId,omitempty"` Quantity int32 `json:"quantity,omitempty"` diff --git a/samples/server/petstore/go-gin-api-server/go/model_pet.go b/samples/server/petstore/go-gin-api-server/go/model_pet.go index fb206487ab08..5b458f652ba2 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_pet.go +++ b/samples/server/petstore/go-gin-api-server/go/model_pet.go @@ -12,13 +12,13 @@ package petstoreserver // Pet - A pet for sale in the pet store type Pet struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Category Category `json:"category,omitempty"` Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` + PhotoURLs []string `json:"photoUrls"` Tags []Tag `json:"tags,omitempty"` diff --git a/samples/server/petstore/go-gin-api-server/go/model_tag.go b/samples/server/petstore/go-gin-api-server/go/model_tag.go index 2fb07fb32c46..64ba94ae1079 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_tag.go +++ b/samples/server/petstore/go-gin-api-server/go/model_tag.go @@ -12,7 +12,7 @@ package petstoreserver // Tag - A tag for a pet type Tag struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/samples/server/petstore/go-gin-api-server/go/model_user.go b/samples/server/petstore/go-gin-api-server/go/model_user.go index 8f40d0ac04cb..c0e66b106cb1 100644 --- a/samples/server/petstore/go-gin-api-server/go/model_user.go +++ b/samples/server/petstore/go-gin-api-server/go/model_user.go @@ -12,7 +12,7 @@ package petstoreserver // User - A User who is purchasing from the pet store type User struct { - Id int64 `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` Username string `json:"username,omitempty"` diff --git a/samples/server/petstore/go-gin-api-server/go/routers.go b/samples/server/petstore/go-gin-api-server/go/routers.go index 0a1432a6269c..a82a99328b39 100644 --- a/samples/server/petstore/go-gin-api-server/go/routers.go +++ b/samples/server/petstore/go-gin-api-server/go/routers.go @@ -91,10 +91,10 @@ var routes = Routes{ }, { - "GetPetById", + "GetPetByID", http.MethodGet, "/v2/pet/:petId", - GetPetById, + GetPetByID, }, { @@ -133,10 +133,10 @@ var routes = Routes{ }, { - "GetOrderById", + "GetOrderByID", http.MethodGet, "/v2/store/order/:orderId", - GetOrderById, + GetOrderByID, }, {