Skip to content

Commit

Permalink
Merge pull request #86 from YegorZh/fix/java-sdk-generation
Browse files Browse the repository at this point in the history
Fixes to generate java sdk
  • Loading branch information
ilyamerman authored May 20, 2024
2 parents a592f1e + 26ed3dc commit 50a2f58
Show file tree
Hide file tree
Showing 22 changed files with 27 additions and 72 deletions.
2 changes: 1 addition & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Unit OpenAPI specifications",
"description": "An OpenAPI specifications for unit-sdk clients",
"version": "0.0.2"
"version": "0.0.4"
},
"servers": [
{
Expand Down
1 change: 1 addition & 0 deletions schemas/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"enum": [
"ByCustomer",
"Fraud",
"Overdue",
"NegativeBalance",
"ByBank",
"BreachOfTermsAndConditions",
Expand Down
1 change: 1 addition & 0 deletions schemas/account_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{
"name":"page",
"in":"query",
"style": "deepObject",
"schema":{
"$ref":"types.json#/definitions/listPageParametersObject"
}
Expand Down
2 changes: 2 additions & 0 deletions schemas/application_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
{
"name":"page",
"in":"query",
"style": "deepObject",
"schema":{
"$ref":"types.json#/definitions/listPageParametersObject"
}
Expand Down Expand Up @@ -346,6 +347,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
2 changes: 2 additions & 0 deletions schemas/authorization_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down Expand Up @@ -160,6 +161,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/card_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name":"page",
"in":"query",
"style": "deepObject",
"schema":{
"$ref":"types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/check_deposit_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/check_payment_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/counterparty_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name":"page",
"in":"query",
"style": "deepObject",
"schema":{
"$ref":"types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/customer_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
{
"name":"page",
"in":"query",
"style": "deepObject",
"schema":{
"$ref":"types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/dispute_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/event_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
2 changes: 2 additions & 0 deletions schemas/payments_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down Expand Up @@ -510,6 +511,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/repayment_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/reward_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/statement_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
1 change: 1 addition & 0 deletions schemas/stop_payment_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
30 changes: 1 addition & 29 deletions schemas/transaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,7 @@
"title": "transactionRelationships",
"properties": {
"account": {
"type": "object",
"title": "accountRelationship",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"depositAccount",
"glAccount",
"account"
]
},
"id": {
"$ref": "types.json#/definitions/identifier"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
}
},
"required": [
"data"
],
"additionalProperties": false
"$ref": "./createPayment.json#/definitions/accountRelationship"
},
"receivingAccount": {
"type": "object",
Expand Down
1 change: 1 addition & 0 deletions schemas/transaction_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
35 changes: 2 additions & 33 deletions schemas/update_transaction.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
{
"definitions": {
"accountRelationship": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"account",
"depositAccount",
"creditAccount",
"batchAccount"
]
},
"id": {
"$ref": "types.json#/definitions/identifier"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
}
},
"required": [
"data"
],
"additionalProperties": false
},
"patchTransactionTags": {
"title": "Patch Transaction",
"type": "object",
Expand Down Expand Up @@ -67,7 +36,7 @@
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/accountRelationship"
"$ref": "./createPayment.json#/definitions/accountRelationship"
}
},
"required": [
Expand Down Expand Up @@ -98,7 +67,7 @@
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/accountRelationship"
"$ref": "./createPayment.json#/definitions/accountRelationship"
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions schemas/webhook_paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"name": "page",
"in": "query",
"style": "deepObject",
"schema": {
"$ref": "types.json#/definitions/listPageParametersObject"
}
Expand Down
11 changes: 2 additions & 9 deletions unit/e2e_tests/java/ApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,12 @@ static void init() {
@Test
public void GetApplicationListApiTest() throws ApiException {
GetListApplicationsApi api = new GetListApplicationsApi();

ExecuteFilterParameter filter = new ExecuteFilterParameter();

ListPageParametersObject page = new ListPageParametersObject();
page.setLimit(20);
page.setOffset(3);

ArrayList statuses = new ArrayList();
statuses.add(ExecuteFilterParameter.StatusEnum.APPROVED);
statuses.add(ExecuteFilterParameter.StatusEnum.AWAITINGDOCUMENTS);
filter.setQuery("John");
filter.setStatus(statuses);

UnitListApplicationsResponse response = api.execute(page, filter, null);
UnitListApplicationsResponse response = api.execute(page, null, null);
assert response.getData().size() <= 20;
}

Expand Down

0 comments on commit 50a2f58

Please sign in to comment.