Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ({{/imports}}{{#imports}}
type {{classname}} struct {
{{#vars}}{{#description}}
// {{{description}}}{{/description}}
{{name}} {{{datatype}}} `json:"{{baseName}},omitempty"`
{{name}} {{^isPrimitiveType}}{{^isContainer}}{{^isDate}}{{^isDateTime}}*{{/isDateTime}}{{/isDate}}{{/isContainer}}{{/isPrimitiveType}}{{{datatype}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"`
{{/vars}}
}
{{/model}}{{/models}}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDate}}{{^isDateTime}}*{{/isDateTime}}{{/isDate}}{{/isContainer}}{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This API client was generated by the [swagger-codegen](https://github.com/swagge

- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.GoClientCodegen
- Build package: class io.swagger.codegen.languages.GoClientCodegen

## Installation
Put the package under your project folder and add the following in import:
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/animal.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package petstore

type Animal struct {

ClassName string `json:"className,omitempty"`
ClassName string `json:"className"`

Color string `json:"color,omitempty"`
}
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package petstore

type Cat struct {

ClassName string `json:"className,omitempty"`
ClassName string `json:"className"`

Color string `json:"color,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/docs/EnumTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**EnumString** | **string** | | [optional] [default to null]
**EnumInteger** | **int32** | | [optional] [default to null]
**EnumNumber** | **float64** | | [optional] [default to null]
**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] [default to null]
**OuterEnum** | [***OuterEnum**](OuterEnum.md) | | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/docs/Pet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional] [default to null]
**Category** | [**Category**](Category.md) | | [optional] [default to null]
**Category** | [***Category**](Category.md) | | [optional] [default to null]
**Name** | **string** | | [default to null]
**PhotoUrls** | **[]string** | | [default to null]
**Tags** | [**[]Tag**](Tag.md) | | [optional] [default to null]
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/dog.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package petstore

type Dog struct {

ClassName string `json:"className,omitempty"`
ClassName string `json:"className"`

Color string `json:"color,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/enum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ type EnumTest struct {

EnumNumber float64 `json:"enum_number,omitempty"`

OuterEnum OuterEnum `json:"outerEnum,omitempty"`
OuterEnum *OuterEnum `json:"outerEnum,omitempty"`
}
8 changes: 4 additions & 4 deletions samples/client/petstore/go/go-petstore/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ type FormatTest struct {

Int64_ int64 `json:"int64,omitempty"`

Number float32 `json:"number,omitempty"`
Number float32 `json:"number"`

Float float32 `json:"float,omitempty"`

Double float64 `json:"double,omitempty"`

String_ string `json:"string,omitempty"`

Byte_ string `json:"byte,omitempty"`
Byte_ string `json:"byte"`

Binary string `json:"binary,omitempty"`

Date time.Time `json:"date,omitempty"`
Date time.Time `json:"date"`

DateTime time.Time `json:"dateTime,omitempty"`

Uuid string `json:"uuid,omitempty"`

Password string `json:"password,omitempty"`
Password string `json:"password"`
}
2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package petstore
// Model for testing model name same as property name
type Name struct {

Name int32 `json:"name,omitempty"`
Name int32 `json:"name"`

SnakeCase int32 `json:"snake_case,omitempty"`

Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/go/go-petstore/pet.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ type Pet struct {

Id int64 `json:"id,omitempty"`

Category Category `json:"category,omitempty"`
Category *Category `json:"category,omitempty"`

Name string `json:"name,omitempty"`
Name string `json:"name"`

PhotoUrls []string `json:"photoUrls,omitempty"`
PhotoUrls []string `json:"photoUrls"`

Tags []Tag `json:"tags,omitempty"`

Expand Down