Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
489985d
Handle null type
sebastien-rosset Apr 30, 2020
c16089e
Handle null type
sebastien-rosset Apr 30, 2020
26865b3
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
48c310e
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
fddb63b
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
cf4e9f8
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
3b59b47
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset May 1, 2020
b362f92
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset May 1, 2020
ae93643
improve documentation
sebastien-rosset May 1, 2020
f5acfba
Handle 'null' type
sebastien-rosset May 1, 2020
6ba1523
Handle 'null' type. Add unit tests
sebastien-rosset May 1, 2020
de13169
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 1, 2020
2a6a87a
Add NullType for go
sebastien-rosset May 2, 2020
86bc4c0
Add NullType for go
sebastien-rosset May 2, 2020
6b9c0ce
fix modeling of AnyType for go-experimental
sebastien-rosset May 2, 2020
b0d221e
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 2, 2020
a302894
execute scripts in bin directory
sebastien-rosset May 3, 2020
e449c82
resolve merge conflicts
sebastien-rosset May 3, 2020
043f247
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 4, 2020
1e14c94
Add review comments
sebastien-rosset May 4, 2020
747803e
Add 'null' type in oneOf
sebastien-rosset May 4, 2020
aa06a89
Improve OAS YAML file for golang openapi3 samples
sebastien-rosset May 4, 2020
543d406
'Any type' includes the null value, so 'isNullable' should be set to …
sebastien-rosset May 4, 2020
81093c7
'Any type' includes the null value, so 'isNullable' should be set to …
sebastien-rosset May 4, 2020
9a54ea1
Handle AnyType and NullType
sebastien-rosset May 5, 2020
dc7a7e0
handle anytype for go-experimental
sebastien-rosset May 5, 2020
ddc810c
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 5, 2020
03ec914
Log warning instead of error
sebastien-rosset May 5, 2020
bdf3653
anyOf/oneOf
sebastien-rosset May 5, 2020
9dbae45
Change x-golang-is-container extension to x-golang-has-wrapper
sebastien-rosset May 5, 2020
e1417ec
Add code comments
sebastien-rosset May 5, 2020
480ecbe
Handle Object and any type
sebastien-rosset May 5, 2020
a58f121
Handle Object and any type
sebastien-rosset May 5, 2020
01ff36e
Handle object and any type
sebastien-rosset May 5, 2020
ec97db3
add code comments
sebastien-rosset May 6, 2020
431356c
handle additional properties
sebastien-rosset May 6, 2020
93752ff
handle additional properties
sebastien-rosset May 6, 2020
261dbcd
handle additional properties
sebastien-rosset May 6, 2020
aa6b6df
handle anytype and objecttype for go-exerimental
sebastien-rosset May 6, 2020
90c0c9e
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
f56c812
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
b159356
Better names for the OAS document test properties
sebastien-rosset May 7, 2020
ef5149e
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
84162be
Run samples scripts
sebastien-rosset May 7, 2020
ee786cb
Run samples scripts
sebastien-rosset May 7, 2020
058694b
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 7, 2020
82cb0e9
fix unit test issues
sebastien-rosset May 8, 2020
2c5c1cf
Handle none type
sebastien-rosset May 8, 2020
0694f83
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 8, 2020
b6afbc6
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 8, 2020
f275dc9
Fix index out of range exception
sebastien-rosset May 8, 2020
93cc8c8
fix formatting issues
sebastien-rosset May 8, 2020
6939648
fix formatting issues
sebastien-rosset May 8, 2020
8bdca05
fix formatting issues. Finally figured out how to check formatting in…
sebastien-rosset May 8, 2020
4c01344
fix formatting issues
sebastien-rosset May 8, 2020
537c28b
resolve merge conflicts
sebastien-rosset May 11, 2020
71d550c
resolve merge conflicts
sebastien-rosset May 11, 2020
11c52e4
resolve merge conflicts
sebastien-rosset May 12, 2020
e16c24e
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 12, 2020
8f1c202
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 12, 2020
5e48c72
run samples scripts
sebastien-rosset May 12, 2020
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
Prev Previous commit
Next Next commit
Improve OAS YAML file for golang openapi3 samples
  • Loading branch information
sebastien-rosset committed May 4, 2020
commit aa06a8940565754eee6058ca90b41c1fbd4568c8
Original file line number Diff line number Diff line change
Expand Up @@ -1250,22 +1250,31 @@ components:
type: integer
format: int32
description: User Status
arbitraryObject:
objectWithNoDeclaredProps:
type: object
description: test code generation for objects
Value must be a map of strings to values. It cannot be the 'null' value.
arbitraryNullableObject:
objectWithNoDeclaredPropsNullable:
type: object
description: test code generation for nullable objects.
Value must be a map of strings to values or the 'null' value.
nullable: true
arbitraryTypeValue:
anyTypeProp:
description: test code generation for any type
Value can be any type - string, number, boolean, array or object.
arbitraryNullableTypeValue:
Here the 'type' attribute is not specified, which means the value can be anything,
including the null value, string, number, boolean, array or object.
See https://github.com/OAI/OpenAPI-Specification/issues/1389
anyTypeExceptNullProp:
description: any type except 'null'
Here the 'type' attribute is not specified, which means the value can be anything,
including the null value, string, number, boolean, array or object.
not:
type: 'null'
anyTypePropNullable:
description: test code generation for any type
Value can be any type - string, number, boolean, array, object or
the 'null' value.
Here the 'type' attribute is not specified, which means the value can be anything,
including the null value, string, number, boolean, array or object.
The 'nullable' attribute does not change the allowed values.
nullable: true
xml:
name: User
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1295,17 +1295,18 @@ components:
name: Category
User:
example:
firstName: firstName
lastName: lastName
password: password
userStatus: 6
arbitraryTypeValue: ""
arbitraryNullableTypeValue: ""
objectWithNoDeclaredPropsNullable: '{}'
anyTypeExceptNullProp: ""
firstName: firstName
password: password
phone: phone
objectWithNoDeclaredProps: '{}'
id: 0
arbitraryObject: '{}'
anyTypePropNullable: ""
email: email
arbitraryNullableObject: '{}'
anyTypeProp: ""
username: username
properties:
id:
Expand All @@ -1328,21 +1329,30 @@ components:
description: User Status
format: int32
type: integer
arbitraryObject:
objectWithNoDeclaredProps:
description: test code generation for objects Value must be a map of strings
to values. It cannot be the 'null' value.
type: object
arbitraryNullableObject:
objectWithNoDeclaredPropsNullable:
description: test code generation for nullable objects. Value must be a
map of strings to values or the 'null' value.
nullable: true
type: object
arbitraryTypeValue:
description: test code generation for any type Value can be any type - string,
anyTypeProp:
description: test code generation for any type Here the 'type' attribute
is not specified, which means the value can be anything, including the
null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389
anyTypeExceptNullProp:
description: any type except 'null' Here the 'type' attribute is not specified,
which means the value can be anything, including the null value, string,
number, boolean, array or object.
arbitraryNullableTypeValue:
description: test code generation for any type Value can be any type - string,
number, boolean, array, object or the 'null' value.
not:
type: "null"
anyTypePropNullable:
description: test code generation for any type Here the 'type' attribute
is not specified, which means the value can be anything, including the
null value, string, number, boolean, array or object. The 'nullable' attribute
does not change the allowed values.
nullable: true
type: object
xml:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ import (

func main() {
query := "query_example" // string |
user := openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ArbitraryObject: "TODO", ArbitraryNullableObject: "TODO", ArbitraryTypeValue: "TODO", ArbitraryNullableTypeValue: "TODO"} // User |
user := openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ObjectWithNoDeclaredProps: "TODO", ObjectWithNoDeclaredPropsNullable: "TODO", AnyTypeProp: "TODO", AnyTypeExceptNullProp: 123, AnyTypePropNullable: "TODO"} // User |

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Name | Type | Description | Notes
**Password** | Pointer to **string** | | [optional]
**Phone** | Pointer to **string** | | [optional]
**UserStatus** | Pointer to **int32** | User Status | [optional]
**ArbitraryObject** | Pointer to [**ObjectType**](.md) | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional]
**ArbitraryNullableObject** | Pointer to [**ObjectType**](.md) | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional]
**ArbitraryTypeValue** | Pointer to [**AnyType**](.md) | test code generation for any type Value can be any type - string, number, boolean, array or object. | [optional]
**ArbitraryNullableTypeValue** | Pointer to [**AnyType**](.md) | test code generation for any type Value can be any type - string, number, boolean, array, object or the 'null' value. | [optional]
**ObjectWithNoDeclaredProps** | Pointer to [**ObjectType**](.md) | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional]
**ObjectWithNoDeclaredPropsNullable** | Pointer to [**ObjectType**](.md) | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional]
**AnyTypeProp** | Pointer to [**AnyType**](.md) | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional]
**AnyTypeExceptNullProp** | Pointer to **ObjectType** | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | [optional]
**AnyTypePropNullable** | Pointer to [**AnyType**](.md) | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional]

## Methods

Expand Down Expand Up @@ -236,126 +237,151 @@ SetUserStatus sets UserStatus field to given value.

HasUserStatus returns a boolean if a field has been set.

### GetArbitraryObject
### GetObjectWithNoDeclaredProps

`func (o *User) GetArbitraryObject() ObjectType`
`func (o *User) GetObjectWithNoDeclaredProps() ObjectType`

GetArbitraryObject returns the ArbitraryObject field if non-nil, zero value otherwise.
GetObjectWithNoDeclaredProps returns the ObjectWithNoDeclaredProps field if non-nil, zero value otherwise.

### GetArbitraryObjectOk
### GetObjectWithNoDeclaredPropsOk

`func (o *User) GetArbitraryObjectOk() (*ObjectType, bool)`
`func (o *User) GetObjectWithNoDeclaredPropsOk() (*ObjectType, bool)`

GetArbitraryObjectOk returns a tuple with the ArbitraryObject field if it's non-nil, zero value otherwise
GetObjectWithNoDeclaredPropsOk returns a tuple with the ObjectWithNoDeclaredProps field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetArbitraryObject
### SetObjectWithNoDeclaredProps

`func (o *User) SetArbitraryObject(v ObjectType)`
`func (o *User) SetObjectWithNoDeclaredProps(v ObjectType)`

SetArbitraryObject sets ArbitraryObject field to given value.
SetObjectWithNoDeclaredProps sets ObjectWithNoDeclaredProps field to given value.

### HasArbitraryObject
### HasObjectWithNoDeclaredProps

`func (o *User) HasArbitraryObject() bool`
`func (o *User) HasObjectWithNoDeclaredProps() bool`

HasArbitraryObject returns a boolean if a field has been set.
HasObjectWithNoDeclaredProps returns a boolean if a field has been set.

### GetArbitraryNullableObject
### GetObjectWithNoDeclaredPropsNullable

`func (o *User) GetArbitraryNullableObject() ObjectType`
`func (o *User) GetObjectWithNoDeclaredPropsNullable() ObjectType`

GetArbitraryNullableObject returns the ArbitraryNullableObject field if non-nil, zero value otherwise.
GetObjectWithNoDeclaredPropsNullable returns the ObjectWithNoDeclaredPropsNullable field if non-nil, zero value otherwise.

### GetArbitraryNullableObjectOk
### GetObjectWithNoDeclaredPropsNullableOk

`func (o *User) GetArbitraryNullableObjectOk() (*ObjectType, bool)`
`func (o *User) GetObjectWithNoDeclaredPropsNullableOk() (*ObjectType, bool)`

GetArbitraryNullableObjectOk returns a tuple with the ArbitraryNullableObject field if it's non-nil, zero value otherwise
GetObjectWithNoDeclaredPropsNullableOk returns a tuple with the ObjectWithNoDeclaredPropsNullable field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetArbitraryNullableObject
### SetObjectWithNoDeclaredPropsNullable

`func (o *User) SetArbitraryNullableObject(v ObjectType)`
`func (o *User) SetObjectWithNoDeclaredPropsNullable(v ObjectType)`

SetArbitraryNullableObject sets ArbitraryNullableObject field to given value.
SetObjectWithNoDeclaredPropsNullable sets ObjectWithNoDeclaredPropsNullable field to given value.

### HasArbitraryNullableObject
### HasObjectWithNoDeclaredPropsNullable

`func (o *User) HasArbitraryNullableObject() bool`
`func (o *User) HasObjectWithNoDeclaredPropsNullable() bool`

HasArbitraryNullableObject returns a boolean if a field has been set.
HasObjectWithNoDeclaredPropsNullable returns a boolean if a field has been set.

### SetArbitraryNullableObjectNil
### SetObjectWithNoDeclaredPropsNullableNil

`func (o *User) SetArbitraryNullableObjectNil(b bool)`
`func (o *User) SetObjectWithNoDeclaredPropsNullableNil(b bool)`

SetArbitraryNullableObjectNil sets the value for ArbitraryNullableObject to be an explicit nil
SetObjectWithNoDeclaredPropsNullableNil sets the value for ObjectWithNoDeclaredPropsNullable to be an explicit nil

### UnsetArbitraryNullableObject
`func (o *User) UnsetArbitraryNullableObject()`
### UnsetObjectWithNoDeclaredPropsNullable
`func (o *User) UnsetObjectWithNoDeclaredPropsNullable()`

UnsetArbitraryNullableObject ensures that no value is present for ArbitraryNullableObject, not even an explicit nil
### GetArbitraryTypeValue
UnsetObjectWithNoDeclaredPropsNullable ensures that no value is present for ObjectWithNoDeclaredPropsNullable, not even an explicit nil
### GetAnyTypeProp

`func (o *User) GetArbitraryTypeValue() AnyType`
`func (o *User) GetAnyTypeProp() AnyType`

GetArbitraryTypeValue returns the ArbitraryTypeValue field if non-nil, zero value otherwise.
GetAnyTypeProp returns the AnyTypeProp field if non-nil, zero value otherwise.

### GetArbitraryTypeValueOk
### GetAnyTypePropOk

`func (o *User) GetArbitraryTypeValueOk() (*AnyType, bool)`
`func (o *User) GetAnyTypePropOk() (*AnyType, bool)`

GetArbitraryTypeValueOk returns a tuple with the ArbitraryTypeValue field if it's non-nil, zero value otherwise
GetAnyTypePropOk returns a tuple with the AnyTypeProp field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetArbitraryTypeValue
### SetAnyTypeProp

`func (o *User) SetArbitraryTypeValue(v AnyType)`
`func (o *User) SetAnyTypeProp(v AnyType)`

SetArbitraryTypeValue sets ArbitraryTypeValue field to given value.
SetAnyTypeProp sets AnyTypeProp field to given value.

### HasArbitraryTypeValue
### HasAnyTypeProp

`func (o *User) HasArbitraryTypeValue() bool`
`func (o *User) HasAnyTypeProp() bool`

HasArbitraryTypeValue returns a boolean if a field has been set.
HasAnyTypeProp returns a boolean if a field has been set.

### GetArbitraryNullableTypeValue
### GetAnyTypeExceptNullProp

`func (o *User) GetArbitraryNullableTypeValue() AnyType`
`func (o *User) GetAnyTypeExceptNullProp() ObjectType`

GetArbitraryNullableTypeValue returns the ArbitraryNullableTypeValue field if non-nil, zero value otherwise.
GetAnyTypeExceptNullProp returns the AnyTypeExceptNullProp field if non-nil, zero value otherwise.

### GetArbitraryNullableTypeValueOk
### GetAnyTypeExceptNullPropOk

`func (o *User) GetArbitraryNullableTypeValueOk() (*AnyType, bool)`
`func (o *User) GetAnyTypeExceptNullPropOk() (*ObjectType, bool)`

GetArbitraryNullableTypeValueOk returns a tuple with the ArbitraryNullableTypeValue field if it's non-nil, zero value otherwise
GetAnyTypeExceptNullPropOk returns a tuple with the AnyTypeExceptNullProp field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetArbitraryNullableTypeValue
### SetAnyTypeExceptNullProp

`func (o *User) SetArbitraryNullableTypeValue(v AnyType)`
`func (o *User) SetAnyTypeExceptNullProp(v ObjectType)`

SetArbitraryNullableTypeValue sets ArbitraryNullableTypeValue field to given value.
SetAnyTypeExceptNullProp sets AnyTypeExceptNullProp field to given value.

### HasArbitraryNullableTypeValue
### HasAnyTypeExceptNullProp

`func (o *User) HasArbitraryNullableTypeValue() bool`
`func (o *User) HasAnyTypeExceptNullProp() bool`

HasArbitraryNullableTypeValue returns a boolean if a field has been set.
HasAnyTypeExceptNullProp returns a boolean if a field has been set.

### SetArbitraryNullableTypeValueNil
### GetAnyTypePropNullable

`func (o *User) SetArbitraryNullableTypeValueNil(b bool)`
`func (o *User) GetAnyTypePropNullable() AnyType`

SetArbitraryNullableTypeValueNil sets the value for ArbitraryNullableTypeValue to be an explicit nil
GetAnyTypePropNullable returns the AnyTypePropNullable field if non-nil, zero value otherwise.

### UnsetArbitraryNullableTypeValue
`func (o *User) UnsetArbitraryNullableTypeValue()`
### GetAnyTypePropNullableOk

UnsetArbitraryNullableTypeValue ensures that no value is present for ArbitraryNullableTypeValue, not even an explicit nil
`func (o *User) GetAnyTypePropNullableOk() (*AnyType, bool)`

GetAnyTypePropNullableOk returns a tuple with the AnyTypePropNullable field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAnyTypePropNullable

`func (o *User) SetAnyTypePropNullable(v AnyType)`

SetAnyTypePropNullable sets AnyTypePropNullable field to given value.

### HasAnyTypePropNullable

`func (o *User) HasAnyTypePropNullable() bool`

HasAnyTypePropNullable returns a boolean if a field has been set.

### SetAnyTypePropNullableNil

`func (o *User) SetAnyTypePropNullableNil(b bool)`

SetAnyTypePropNullableNil sets the value for AnyTypePropNullable to be an explicit nil

### UnsetAnyTypePropNullable
`func (o *User) UnsetAnyTypePropNullable()`

UnsetAnyTypePropNullable ensures that no value is present for AnyTypePropNullable, not even an explicit nil

[[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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
)

func main() {
user := openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ArbitraryObject: "TODO", ArbitraryNullableObject: "TODO", ArbitraryTypeValue: "TODO", ArbitraryNullableTypeValue: "TODO"} // User | Created user object
user := openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ObjectWithNoDeclaredProps: "TODO", ObjectWithNoDeclaredPropsNullable: "TODO", AnyTypeProp: "TODO", AnyTypeExceptNullProp: 123, AnyTypePropNullable: "TODO"} // User | Created user object

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
Expand Down Expand Up @@ -98,7 +98,7 @@ import (
)

func main() {
user := []User{openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ArbitraryObject: "TODO", ArbitraryNullableObject: "TODO", ArbitraryTypeValue: "TODO", ArbitraryNullableTypeValue: "TODO"}} // []User | List of user object
user := []User{openapiclient.User{Id: int64(123), Username: "Username_example", FirstName: "FirstName_example", LastName: "LastName_example", Email: "Email_example", Password: "Password_example", Phone: "Phone_example", UserStatus: 123, ObjectWithNoDeclaredProps: "TODO", ObjectWithNoDeclaredPropsNullable: "TODO", AnyTypeProp: "TODO", AnyTypeExceptNullProp: 123, AnyTypePropNullable: "TODO"}} // []User | List of user object

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
Expand Down
Loading