fix trailing comma in go api client

This commit is contained in:
wing328 2016-09-24 00:57:01 +08:00
parent f47208a75b
commit dce532e8c7
5 changed files with 32 additions and 32 deletions

View File

@ -98,7 +98,7 @@ func (a {{{classname}}}) {{{nickname}}}({{#allParams}}{{paramName}} {{{dataType}
{{/hasQueryParams}} {{/hasQueryParams}}
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} } localVarHttpContentTypes := []string{ {{#consumes}}"{{{mediaType}}}", {{/consumes}} }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -108,7 +108,7 @@ func (a {{{classname}}}) {{{nickname}}}({{#allParams}}{{paramName}} {{{dataType}
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
{{#produces}} {{#produces}}
"{{{mediaType}}}"{{^-last}},{{/-last}} "{{{mediaType}}}",
{{/produces}} {{/produces}}
} }

View File

@ -73,7 +73,7 @@ func (a FakeApi) TestClientModel(body Client) (*Client, *APIResponse, error) {
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json" } localVarHttpContentTypes := []string{ "application/json", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -82,7 +82,7 @@ func (a FakeApi) TestClientModel(body Client) (*Client, *APIResponse, error) {
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -152,7 +152,7 @@ func (a FakeApi) TestEndpointParameters(number float32, double float64, patternW
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/xml; charset=utf-8", "application/json; charset=utf-8" } localVarHttpContentTypes := []string{ "application/xml; charset=utf-8", "application/json; charset=utf-8", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -162,7 +162,7 @@ func (a FakeApi) TestEndpointParameters(number float32, double float64, patternW
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml; charset=utf-8", "application/xml; charset=utf-8",
"application/json; charset=utf-8" "application/json; charset=utf-8",
} }
// set Accept header // set Accept header
@ -240,7 +240,7 @@ func (a FakeApi) TestEnumParameters(enumFormStringArray []string, enumFormString
localVarQueryParams.Add("enum_query_integer", a.Configuration.APIClient.ParameterToString(enumQueryInteger, "")) localVarQueryParams.Add("enum_query_integer", a.Configuration.APIClient.ParameterToString(enumQueryInteger, ""))
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json" } localVarHttpContentTypes := []string{ "application/json", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -249,7 +249,7 @@ func (a FakeApi) TestEnumParameters(enumFormStringArray []string, enumFormString
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/json" "application/json",
} }
// set Accept header // set Accept header

View File

@ -81,7 +81,7 @@ func (a PetApi) AddPet(body Pet) (*APIResponse, error) {
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", "application/xml" } localVarHttpContentTypes := []string{ "application/json", "application/xml", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -91,7 +91,7 @@ func (a PetApi) AddPet(body Pet) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -159,7 +159,7 @@ func (a PetApi) DeletePet(petId int64, apiKey string) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -233,7 +233,7 @@ func (a PetApi) FindPetsByStatus(status []string) ([]Pet, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -307,7 +307,7 @@ func (a PetApi) FindPetsByTags(tags []string) ([]Pet, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -372,7 +372,7 @@ func (a PetApi) GetPetById(petId int64) (*Pet, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -428,7 +428,7 @@ func (a PetApi) UpdatePet(body Pet) (*APIResponse, error) {
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", "application/xml" } localVarHttpContentTypes := []string{ "application/json", "application/xml", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -438,7 +438,7 @@ func (a PetApi) UpdatePet(body Pet) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -497,7 +497,7 @@ func (a PetApi) UpdatePetWithForm(petId int64, name string, status string) (*API
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded" } localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -507,7 +507,7 @@ func (a PetApi) UpdatePetWithForm(petId int64, name string, status string) (*API
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -566,7 +566,7 @@ func (a PetApi) UploadFile(petId int64, additionalMetadata string, file *os.File
} }
// to determine the Content-Type header // to determine the Content-Type header
localVarHttpContentTypes := []string{ "multipart/form-data" } localVarHttpContentTypes := []string{ "multipart/form-data", }
// set Content-Type header // set Content-Type header
localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
@ -575,7 +575,7 @@ func (a PetApi) UploadFile(petId int64, additionalMetadata string, file *os.File
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/json" "application/json",
} }
// set Accept header // set Accept header

View File

@ -85,7 +85,7 @@ func (a StoreApi) DeleteOrder(orderId string) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -145,7 +145,7 @@ func (a StoreApi) GetInventory() (*map[string]int32, *APIResponse, error) {
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -207,7 +207,7 @@ func (a StoreApi) GetOrderById(orderId int64) (*Order, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -268,7 +268,7 @@ func (a StoreApi) PlaceOrder(body Order) (*Order, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header

View File

@ -84,7 +84,7 @@ func (a UserApi) CreateUser(body User) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -145,7 +145,7 @@ func (a UserApi) CreateUsersWithArrayInput(body []User) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -206,7 +206,7 @@ func (a UserApi) CreateUsersWithListInput(body []User) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -268,7 +268,7 @@ func (a UserApi) DeleteUser(username string) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -328,7 +328,7 @@ func (a UserApi) GetUserByName(username string) (*User, *APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -392,7 +392,7 @@ func (a UserApi) LoginUser(username string, password string) (*string, *APIRespo
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -452,7 +452,7 @@ func (a UserApi) LogoutUser() (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header
@ -513,7 +513,7 @@ func (a UserApi) UpdateUser(username string, body User) (*APIResponse, error) {
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{ localVarHttpHeaderAccepts := []string{
"application/xml", "application/xml",
"application/json" "application/json",
} }
// set Accept header // set Accept header