Skip to content

Commit

Permalink
fix: swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Dec 19, 2022
1 parent 54b8ae3 commit 8e6a3fb
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 16 deletions.
4 changes: 2 additions & 2 deletions client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ api_search.go
client.go
configuration.go
docs/DefaultApi.md
docs/GetServerInfo200Response.md
docs/Query.md
docs/Response.md
docs/ResponseCursor.md
docs/ResponseCursorTotal.md
docs/SearchApi.md
docs/ServerInfo.md
git_push.sh
go.mod
go.sum
model_get_server_info_200_response.go
model_query.go
model_response.go
model_response_cursor.go
model_response_cursor_total.go
model_server_info.go
response.go
utils.go
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [GetServerInfo200Response](docs/GetServerInfo200Response.md)
- [Query](docs/Query.md)
- [Response](docs/Response.md)
- [ResponseCursor](docs/ResponseCursor.md)
- [ResponseCursorTotal](docs/ResponseCursorTotal.md)
- [ServerInfo](docs/ServerInfo.md)


## Documentation For Authorization
Expand Down
6 changes: 4 additions & 2 deletions client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/getServerInfo_200_response'
$ref: '#/components/schemas/ServerInfo'
description: Server information
summary: Get server info
/:
Expand Down Expand Up @@ -76,11 +76,13 @@ components:
description: "The kind of the object, either \"TRANSACTION\" or \"META\""
ledger:
description: The ledger
getServerInfo_200_response:
ServerInfo:
example:
version: ""
properties:
version: {}
required:
- version
Response_cursor_total:
example:
value: ""
Expand Down
8 changes: 4 additions & 4 deletions client/api_default.go

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

6 changes: 3 additions & 3 deletions client/docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Method | HTTP request | Description

## GetServerInfo

> GetServerInfo200Response GetServerInfo(ctx).Execute()
> ServerInfo GetServerInfo(ctx).Execute()
Get server info

Expand All @@ -35,7 +35,7 @@ func main() {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetServerInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetServerInfo`: GetServerInfo200Response
// response from `GetServerInfo`: ServerInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetServerInfo`: %v\n", resp)
}
```
Expand All @@ -51,7 +51,7 @@ Other parameters are passed through a pointer to a apiGetServerInfoRequest struc

### Return type

[**GetServerInfo200Response**](GetServerInfo200Response.md)
[**ServerInfo**](ServerInfo.md)

### Authorization

Expand Down
61 changes: 61 additions & 0 deletions client/docs/ServerInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ServerInfo

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Version** | **interface{}** | |

## Methods

### NewServerInfo

`func NewServerInfo(version interface{}, ) *ServerInfo`

NewServerInfo instantiates a new ServerInfo 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

### NewServerInfoWithDefaults

`func NewServerInfoWithDefaults() *ServerInfo`

NewServerInfoWithDefaults instantiates a new ServerInfo 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

### GetVersion

`func (o *ServerInfo) GetVersion() interface{}`

GetVersion returns the Version field if non-nil, zero value otherwise.

### GetVersionOk

`func (o *ServerInfo) GetVersionOk() (*interface{}, bool)`

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

### SetVersion

`func (o *ServerInfo) SetVersion(v interface{})`

SetVersion sets Version field to given value.


### SetVersionNil

`func (o *ServerInfo) SetVersionNil(b bool)`

SetVersionNil sets the value for Version to be an explicit nil

### UnsetVersion
`func (o *ServerInfo) UnsetVersion()`

UnsetVersion ensures that no value is present for Version, 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)


121 changes: 121 additions & 0 deletions client/model_server_info.go

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

12 changes: 8 additions & 4 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
version:
type: string
$ref: '#/components/schemas/ServerInfo'
/:
post:
summary: Search
Expand Down Expand Up @@ -93,3 +90,10 @@ components:
description: The ledger
type: string
type: object
ServerInfo:
type: object
required:
- version
properties:
version:
type: string

0 comments on commit 8e6a3fb

Please sign in to comment.