Skip to content

Commit

Permalink
add tests for anyof in go client
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Jun 13, 2024
1 parent 6b343cb commit be83886
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,12 @@ components:
type: array
items:
type: string
AnyOfPrimitiveType:
anyOf:
- $ref: '#/components/schemas/OneOfPrimitiveTypeChild'
- type: integer
format: int32
- $ref: '#/components/schemas/OneOfArrayOfString'
# `dup-prop` is defined in both parent and child models
# but not identical: optional vs required
DuplicatedPropChild:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ docs/AdditionalPropertiesClass.md
docs/AllOfPrimitiveTypes.md
docs/Animal.md
docs/AnotherFakeAPI.md
docs/AnyOfPrimitiveType.md
docs/ApiResponse.md
docs/Apple.md
docs/AppleReq.md
Expand Down Expand Up @@ -91,6 +92,7 @@ model__special_model_name_.go
model_additional_properties_class.go
model_all_of_primitive_types.go
model_animal.go
model_any_of_primitive_type.go
model_api_response.go
model_apple.go
model_apple_req.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 @@ -130,6 +130,7 @@ Class | Method | HTTP request | Description
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [AllOfPrimitiveTypes](docs/AllOfPrimitiveTypes.md)
- [Animal](docs/Animal.md)
- [AnyOfPrimitiveType](docs/AnyOfPrimitiveType.md)
- [ApiResponse](docs/ApiResponse.md)
- [Apple](docs/Apple.md)
- [AppleReq](docs/AppleReq.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2113,6 +2113,12 @@ components:
items:
type: string
type: array
AnyOfPrimitiveType:
anyOf:
- $ref: '#/components/schemas/OneOfPrimitiveTypeChild'
- format: int32
type: integer
- $ref: '#/components/schemas/OneOfArrayOfString'
DuplicatedPropChild:
allOf:
- $ref: '#/components/schemas/DuplicatedPropParent'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# AnyOfPrimitiveType

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]

## Methods

### NewAnyOfPrimitiveType

`func NewAnyOfPrimitiveType() *AnyOfPrimitiveType`

NewAnyOfPrimitiveType instantiates a new AnyOfPrimitiveType 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

### NewAnyOfPrimitiveTypeWithDefaults

`func NewAnyOfPrimitiveTypeWithDefaults() *AnyOfPrimitiveType`

NewAnyOfPrimitiveTypeWithDefaults instantiates a new AnyOfPrimitiveType 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

### GetName

`func (o *AnyOfPrimitiveType) GetName() string`

GetName returns the Name field if non-nil, zero value otherwise.

### GetNameOk

`func (o *AnyOfPrimitiveType) GetNameOk() (*string, bool)`

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

### SetName

`func (o *AnyOfPrimitiveType) SetName(v string)`

SetName sets Name field to given value.

### HasName

`func (o *AnyOfPrimitiveType) HasName() bool`

HasName returns a boolean if a field has been 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.

0 comments on commit be83886

Please sign in to comment.