Skip to content

Commit

Permalink
add tests for go oenof datetime (OpenAPITools#13713)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Oct 17, 2022
1 parent a248ae0 commit 02d99ea
Show file tree
Hide file tree
Showing 8 changed files with 198 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2023,3 +2023,8 @@ components:
additionalProperties:
type: string
format: binary
OneOfPrimitiveTypes:
oneOf:
- type: string
- format: date-time
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ docs/NullableClass.md
docs/NumberOnly.md
docs/OneOfPrimitiveType.md
docs/OneOfPrimitiveTypeChild.md
docs/OneOfPrimitiveTypes.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
Expand Down Expand Up @@ -131,6 +132,7 @@ model_nullable_class.go
model_number_only.go
model_one_of_primitive_type.go
model_one_of_primitive_type_child.go
model_one_of_primitive_types.go
model_order.go
model_outer_composite.go
model_outer_enum.go
Expand Down
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/go/go-petstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ Class | Method | HTTP request | Description
- [NumberOnly](docs/NumberOnly.md)
- [OneOfPrimitiveType](docs/OneOfPrimitiveType.md)
- [OneOfPrimitiveTypeChild](docs/OneOfPrimitiveTypeChild.md)
- [OneOfPrimitiveTypes](docs/OneOfPrimitiveTypes.md)
- [Order](docs/Order.md)
- [OuterComposite](docs/OuterComposite.md)
- [OuterEnum](docs/OuterEnum.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,11 @@ components:
description: a property to test map of file
type: object
type: object
OneOfPrimitiveTypes:
oneOf:
- type: string
- format: date-time
type: string
_foo_get_default_response:
example:
string:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OneOfPrimitiveTypes

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Methods

### NewOneOfPrimitiveTypes

`func NewOneOfPrimitiveTypes() *OneOfPrimitiveTypes`

NewOneOfPrimitiveTypes instantiates a new OneOfPrimitiveTypes object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewOneOfPrimitiveTypesWithDefaults

`func NewOneOfPrimitiveTypesWithDefaults() *OneOfPrimitiveTypes`

NewOneOfPrimitiveTypesWithDefaults instantiates a new OneOfPrimitiveTypes object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set


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


Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions samples/openapi3/client/petstore/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ replace go-petstore => ./go-petstore
require (
github.com/stretchr/testify v1.8.0
go-petstore v0.0.0-00010101000000-000000000000
golang.org/x/net v0.0.0-20221004154528-8021a29435af // indirect
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
)
4 changes: 4 additions & 0 deletions samples/openapi3/client/petstore/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9
golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20221004154528-8021a29435af h1:wv66FM3rLZGPdxpYL+ApnDe2HzHcTFta3z5nsc13wI4=
golang.org/x/net v0.0.0-20221004154528-8021a29435af/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU=
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -332,6 +334,8 @@ golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3Abp
golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1 h1:3VPzK7eqH25j7GYw5w6g/GzNRc0/fYtrxz27z1gD4W0=
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk=
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down

0 comments on commit 02d99ea

Please sign in to comment.