forked from loafle/openapi-generator-original
regenerate go sample, rename configuration.go
This commit is contained in:
parent
c880928519
commit
c702a6aaa4
@ -133,7 +133,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("configuration.mustache", packageName, "Configuration.go"));
|
supportingFiles.add(new SupportingFile("configuration.mustache", packageName, "configuration.go"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -201,9 +201,9 @@ func (a PetApi) FindPetsByStatus (status []string) ([]Pet, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
status []string `url:"status,omitempty"`
|
Status []string `url:"status,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ status: status })
|
_sling = _sling.QueryStruct(&QueryParams{ Status: status })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
@ -274,9 +274,9 @@ func (a PetApi) FindPetsByTags (tags []string) ([]Pet, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
tags []string `url:"tags,omitempty"`
|
Tags []string `url:"tags,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ tags: tags })
|
_sling = _sling.QueryStruct(&QueryParams{ Tags: tags })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
@ -497,10 +497,10 @@ func (a PetApi) UpdatePetWithForm (petId int64, name string, status string) (err
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FormParams struct {
|
type FormParams struct {
|
||||||
name string `url:"name,omitempty"`
|
Name string `url:"name,omitempty"`
|
||||||
status string `url:"status,omitempty"`
|
Status string `url:"status,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.BodyForm(&FormParams{ name: name,status: status })
|
_sling = _sling.BodyForm(&FormParams{ Name: name,Status: status })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -574,10 +574,10 @@ func (a PetApi) UploadFile (petId int64, additionalMetadata string, file *os.Fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FormParams struct {
|
type FormParams struct {
|
||||||
additionalMetadata string `url:"additionalMetadata,omitempty"`
|
AdditionalMetadata string `url:"additionalMetadata,omitempty"`
|
||||||
file *os.File `url:"file,omitempty"`
|
File *os.File `url:"file,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.BodyForm(&FormParams{ additionalMetadata: additionalMetadata,file: file })
|
_sling = _sling.BodyForm(&FormParams{ AdditionalMetadata: additionalMetadata,File: file })
|
||||||
|
|
||||||
var successPayload = new(ApiResponse)
|
var successPayload = new(ApiResponse)
|
||||||
|
|
||||||
|
@ -374,10 +374,10 @@ func (a UserApi) LoginUser (username string, password string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
username string `url:"username,omitempty"`
|
Username string `url:"username,omitempty"`
|
||||||
password string `url:"password,omitempty"`
|
Password string `url:"password,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ username: username,password: password })
|
_sling = _sling.QueryStruct(&QueryParams{ Username: username,Password: password })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user