Skip to content

Commit

Permalink
fix: swagger definitions & accounts cursor support
Browse files Browse the repository at this point in the history
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
  • Loading branch information
darkmatterpool committed Jan 6, 2023
1 parent 463fc44 commit ea829e4
Show file tree
Hide file tree
Showing 25 changed files with 1,030 additions and 575 deletions.
8 changes: 4 additions & 4 deletions client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ api/openapi.yaml
api_payments.go
client.go
configuration.go
docs/Account.md
docs/BankingCircleConfig.md
docs/ConnectorBaseInfo.md
docs/Connectors.md
docs/CurrencyCloudConfig.md
docs/Cursor.md
docs/CursorTotal.md
docs/DummyPayConfig.md
docs/GetAllConnectorsConfigs200Response.md
docs/GetConnectorTask200Response.md
docs/GetPayment200Response.md
docs/GetPaymentResponse.md
docs/ListAccountsResponse.md
docs/ListConnectorTasks200Response.md
docs/ListConnectorsConfigsResponse.md
docs/ListConnectorsConfigsResponseConnector.md
Expand Down Expand Up @@ -43,17 +43,17 @@ docs/TaskDescriptorWiseDescriptor.md
docs/WiseConfig.md
go.mod
go.sum
model_account.go
model_banking_circle_config.go
model_connector_base_info.go
model_connectors.go
model_currency_cloud_config.go
model_cursor.go
model_cursor_total.go
model_dummy_pay_config.go
model_get_all_connectors_configs_200_response.go
model_get_connector_task_200_response.go
model_get_payment_200_response.go
model_get_payment_response.go
model_list_accounts_response.go
model_list_connector_tasks_200_response.go
model_list_connectors_configs_response.go
model_list_connectors_configs_response_connector.go
Expand Down
5 changes: 3 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description
*PaymentsApi* | [**GetConnectorTask**](docs/PaymentsApi.md#getconnectortask) | **Get** /connectors/{connector}/tasks/{taskId} | Read a specific task of the connector
*PaymentsApi* | [**GetPayment**](docs/PaymentsApi.md#getpayment) | **Get** /payments/{paymentId} | Returns a payment.
*PaymentsApi* | [**InstallConnector**](docs/PaymentsApi.md#installconnector) | **Post** /connectors/{connector} | Install connector
*PaymentsApi* | [**ListAccounts**](docs/PaymentsApi.md#listaccounts) | **Get** /accounts | Returns a list of accounts.
*PaymentsApi* | [**ListConnectorTasks**](docs/PaymentsApi.md#listconnectortasks) | **Get** /connectors/{connector}/tasks | List connector tasks
*PaymentsApi* | [**ListPayments**](docs/PaymentsApi.md#listpayments) | **Get** /payments | Returns a list of payments.
*PaymentsApi* | [**ReadConnectorConfig**](docs/PaymentsApi.md#readconnectorconfig) | **Get** /connectors/{connector}/config | Read connector config
Expand All @@ -93,17 +94,17 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [Account](docs/Account.md)
- [BankingCircleConfig](docs/BankingCircleConfig.md)
- [ConnectorBaseInfo](docs/ConnectorBaseInfo.md)
- [Connectors](docs/Connectors.md)
- [CurrencyCloudConfig](docs/CurrencyCloudConfig.md)
- [Cursor](docs/Cursor.md)
- [CursorTotal](docs/CursorTotal.md)
- [DummyPayConfig](docs/DummyPayConfig.md)
- [GetAllConnectorsConfigs200Response](docs/GetAllConnectorsConfigs200Response.md)
- [GetConnectorTask200Response](docs/GetConnectorTask200Response.md)
- [GetPayment200Response](docs/GetPayment200Response.md)
- [GetPaymentResponse](docs/GetPaymentResponse.md)
- [ListAccountsResponse](docs/ListAccountsResponse.md)
- [ListConnectorTasks200Response](docs/ListConnectorTasks200Response.md)
- [ListConnectorsConfigsResponse](docs/ListConnectorsConfigsResponse.md)
- [ListConnectorsConfigsResponseConnector](docs/ListConnectorsConfigsResponseConnector.md)
Expand Down
153 changes: 100 additions & 53 deletions client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,47 @@ paths:
summary: Returns a payment.
tags:
- Payments
/accounts:
get:
operationId: listAccounts
parameters:
- description: "Limit the number of accounts to return, pagination can be achieved\
\ in conjunction with 'skip' parameter."
example: 10
explode: true
in: query
name: limit
required: false
schema: {}
style: form
- description: "How many accounts to skip, pagination can be achieved in conjunction\
\ with 'limit' parameter."
example: 100
explode: true
in: query
name: skip
required: false
schema: {}
style: form
- description: Field used to sort payments (Default is by date).
example: status
explode: true
in: query
name: sort
required: false
schema:
items: {}
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ListAccountsResponse'
description: A JSON array of accounts
summary: Returns a list of accounts.
tags:
- Payments
/connectors:
get:
description: Get all installed connectors
Expand Down Expand Up @@ -381,28 +422,19 @@ components:
- loginID
ListPaymentsResponse:
example:
cursor:
next: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
total:
value: 100
previous: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
hasMore: ""
pageSize: 10
data: ""
cursor: ""
properties:
data:
items:
$ref: '#/components/schemas/Payment'
cursor:
$ref: '#/components/schemas/Cursor'
required:
- data
GetPaymentResponse:
properties:
data:
$ref: '#/components/schemas/Payment'
allOf:
- $ref: '#/components/schemas/Cursor'
- properties:
data:
items:
$ref: '#/components/schemas/Payment'
required:
- data
required:
- data
- cursor
Payment:
example:
reference: ""
Expand Down Expand Up @@ -457,6 +489,38 @@ components:
- scheme
- status
- type
ListAccountsResponse:
example:
cursor: ""
properties:
cursor:
allOf:
- $ref: '#/components/schemas/Cursor'
- properties:
data:
items:
$ref: '#/components/schemas/Account'
required:
- data
required:
- cursor
Account:
properties:
id: {}
createdAt:
format: date-time
provider: {}
reference: {}
type:
enum:
- TARGET
- SOURCE
required:
- createdAt
- id
- provider
- reference
- type
ListConnectorsResponse:
example:
data: ""
Expand Down Expand Up @@ -658,13 +722,6 @@ components:
descriptor:
$ref: '#/components/schemas/TaskDescriptorBankingCircle_descriptor'
Cursor:
example:
next: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
total:
value: 100
previous: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
hasMore: ""
pageSize: 10
properties:
hasMore:
description: Indicates if there are more items to fetch
Expand All @@ -677,8 +734,6 @@ components:
pageSize:
description: The number of items per page
example: 10
total:
$ref: '#/components/schemas/Cursor_total'
getPayment_200_response:
example:
data:
Expand Down Expand Up @@ -719,26 +774,25 @@ components:
- $ref: '#/components/schemas/BankingCircleConfig'
listConnectorTasks_200_response:
example:
cursor:
next: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
total:
value: 100
previous: eyJpZCI6IjU5ZjYwZjQ0LWY0ZjktNDY0ZC1hZjQxLWY0ZjQxZjQxZjQxZiJ9
hasMore: ""
pageSize: 10
data: ""
cursor: ""
properties:
cursor:
$ref: '#/components/schemas/Cursor'
data:
items:
oneOf:
- $ref: '#/components/schemas/TaskDescriptorStripe'
- $ref: '#/components/schemas/TaskDescriptorWise'
- $ref: '#/components/schemas/TaskDescriptorCurrencyCloud'
- $ref: '#/components/schemas/TaskDescriptorDummyPay'
- $ref: '#/components/schemas/TaskDescriptorModulr'
- $ref: '#/components/schemas/TaskDescriptorBankingCircle'
allOf:
- $ref: '#/components/schemas/Cursor'
- properties:
data:
items:
oneOf:
- $ref: '#/components/schemas/TaskDescriptorStripe'
- $ref: '#/components/schemas/TaskDescriptorWise'
- $ref: '#/components/schemas/TaskDescriptorCurrencyCloud'
- $ref: '#/components/schemas/TaskDescriptorDummyPay'
- $ref: '#/components/schemas/TaskDescriptorModulr'
- $ref: '#/components/schemas/TaskDescriptorBankingCircle'
required:
- data
required:
- cursor
getConnectorTask_200_response:
example:
data: ""
Expand Down Expand Up @@ -793,10 +847,3 @@ components:
properties:
name: {}
key: {}
Cursor_total:
example:
value: 100
properties:
value:
description: The total number of items available
example: 100
Loading

0 comments on commit ea829e4

Please sign in to comment.