Skip to content

Commit 9ca3fb7

Browse files
Merge pull request #42 from mxenabled/openapi-generator-0.6.2
Generated version 0.6.2
2 parents f98b314 + 36a221f commit 9ca3fb7

File tree

7 files changed

+57
-65
lines changed

7 files changed

+57
-65
lines changed

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mvn clean package
2424
```
2525

2626
Then manually install the following JARs:
27-
- `target/mx-platform-java-0.6.1.jar`
27+
- `target/mx-platform-java-0.6.2.jar`
2828
- `target/lib/*.jar`
2929

3030
### Maven users
@@ -35,7 +35,7 @@ Add this dependency to your project's POM:
3535
<dependency>
3636
<groupId>com.mx</groupId>
3737
<artifactId>mx-platform-java</artifactId>
38-
<version>0.6.1</version>
38+
<version>0.6.2</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
```
@@ -58,36 +58,36 @@ import com.mx.client.mx_platform_api.MxPlatformApi;
5858
import java.util.*;
5959

6060
public class Example {
61-
public static void main(String[] args) {
62-
ApiClient defaultClient = Configuration.getDefaultApiClient();
63-
defaultClient.addDefaultHeader("Accept", "application/vnd.mx.api.v1+json");
64-
65-
// Configure environment. https://int-api.mx.com for development, https://api.mx.com for production
66-
defaultClient.setBasePath("https://int-api.mx.com");
67-
68-
// Configure with your Client ID/API Key from https://dashboard.mx.com
69-
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
70-
basicAuth.setUsername("Your Client ID");
71-
basicAuth.setPassword("Your API Key");
72-
73-
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
74-
75-
UserCreateRequestBody userCreateRequestBody = new UserCreateRequestBody();
76-
UserCreateRequest userCreateRequest = new UserCreateRequest();
77-
userCreateRequest.setMetadata("Creating a user!");
78-
userCreateRequestBody.setUser(userCreateRequest);
79-
80-
try {
81-
UserResponseBody response = apiInstance.createUser(userCreateRequestBody);
82-
System.out.println(response);
83-
} catch (ApiException e) {
84-
System.err.println("Exception when calling MxPlatformApi#createUser");
85-
System.err.println("Status code: " + e.getCode());
86-
System.err.println("Reason: " + e.getResponseBody());
87-
System.err.println("Response headers: " + e.getResponseHeaders());
88-
e.printStackTrace();
89-
}
61+
public static void main(String[] args) {
62+
ApiClient defaultClient = Configuration.getDefaultApiClient();
63+
defaultClient.addDefaultHeader("Accept", "application/vnd.mx.api.v1+json");
64+
65+
// Configure environment. https://int-api.mx.com for development, https://api.mx.com for production
66+
defaultClient.setBasePath("https://int-api.mx.com");
67+
68+
// Configure with your Client ID/API Key from https://dashboard.mx.com
69+
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
70+
basicAuth.setUsername("Your Client ID");
71+
basicAuth.setPassword("Your API Key");
72+
73+
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
74+
75+
UserCreateRequestBody userCreateRequestBody = new UserCreateRequestBody();
76+
UserCreateRequest userCreateRequest = new UserCreateRequest();
77+
userCreateRequest.setMetadata("Creating a user!");
78+
userCreateRequestBody.setUser(userCreateRequest);
79+
80+
try {
81+
UserResponseBody response = apiInstance.createUser(userCreateRequestBody);
82+
System.out.println(response);
83+
} catch (ApiException e) {
84+
System.err.println("Exception when calling MxPlatformApi#createUser");
85+
System.err.println("Status code: " + e.getCode());
86+
System.err.println("Reason: " + e.getResponseBody());
87+
System.err.println("Response headers: " + e.getResponseHeaders());
88+
e.printStackTrace();
9089
}
90+
}
9191
}
9292
```
9393

docs/MxPlatformApi.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4194,7 +4194,7 @@ Name | Type | Description | Notes
41944194

41954195
<a name="readDefaultCategory"></a>
41964196
# **readDefaultCategory**
4197-
> CategoryResponseBody readDefaultCategory(categoryGuid, userGuid)
4197+
> CategoryResponseBody readDefaultCategory(categoryGuid)
41984198
41994199
Read a default category
42004200

@@ -4222,9 +4222,8 @@ public class Example {
42224222

42234223
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
42244224
String categoryGuid = "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874"; // String | The unique id for a `category`.
4225-
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
42264225
try {
4227-
CategoryResponseBody result = apiInstance.readDefaultCategory(categoryGuid, userGuid);
4226+
CategoryResponseBody result = apiInstance.readDefaultCategory(categoryGuid);
42284227
System.out.println(result);
42294228
} catch (ApiException e) {
42304229
System.err.println("Exception when calling MxPlatformApi#readDefaultCategory");
@@ -4242,7 +4241,6 @@ public class Example {
42424241
Name | Type | Description | Notes
42434242
------------- | ------------- | ------------- | -------------
42444243
**categoryGuid** | **String**| The unique id for a &#x60;category&#x60;. |
4245-
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |
42464244

42474245
### Return type
42484246

@@ -5360,7 +5358,7 @@ public class Example {
53605358
Name | Type | Description | Notes
53615359
------------- | ------------- | ------------- | -------------
53625360
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |
5363-
**connectWidgetRequestBody** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md)| Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) | [optional]
5361+
**connectWidgetRequestBody** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md)| Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) |
53645362

53655363
### Return type
53665364

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiPackage: com.mx.client.mx-platform-api
33
artifactDescription: A Java library for the MX Platform API
44
artifactId: mx-platform-java
55
artifactUrl: https://github.com/mxenabled/mx-platform-java
6-
artifactVersion: 0.6.1
6+
artifactVersion: 0.6.2
77
developerEmail: devexperience@mx.com
88
developerName: MX
99
developerOrganization: MX Technologies Inc.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.6.1</version>
8+
<version>0.6.2</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>

src/main/java/com/mx/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void init() {
131131
json = new JSON();
132132

133133
// Set default User-Agent.
134-
setUserAgent("OpenAPI-Generator/0.6.1/java");
134+
setUserAgent("OpenAPI-Generator/0.6.2/java");
135135

136136
authentications = new HashMap<String, Authentication>();
137137
}

src/main/java/com/mx/client/mx_platform_api/MxPlatformApi.java

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8375,7 +8375,6 @@ public okhttp3.Call readCategoryAsync(String categoryGuid, String userGuid, fina
83758375
/**
83768376
* Build call for readDefaultCategory
83778377
* @param categoryGuid The unique id for a &#x60;category&#x60;. (required)
8378-
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
83798378
* @param _callback Callback for upload/download progress
83808379
* @return Call to execute
83818380
* @throws ApiException If fail to serialize the request body object
@@ -8385,7 +8384,7 @@ public okhttp3.Call readCategoryAsync(String categoryGuid, String userGuid, fina
83858384
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
83868385
</table>
83878386
*/
8388-
public okhttp3.Call readDefaultCategoryCall(String categoryGuid, String userGuid, final ApiCallback _callback) throws ApiException {
8387+
public okhttp3.Call readDefaultCategoryCall(String categoryGuid, final ApiCallback _callback) throws ApiException {
83898388
String basePath = null;
83908389

83918390
// Operation Servers
@@ -8404,8 +8403,7 @@ public okhttp3.Call readDefaultCategoryCall(String categoryGuid, String userGuid
84048403

84058404
// create path and map variables
84068405
String localVarPath = "/categories/{category_guid}"
8407-
.replaceAll("\\{" + "category_guid" + "\\}", localVarApiClient.escapeString(categoryGuid.toString()))
8408-
.replaceAll("\\{" + "user_guid" + "\\}", localVarApiClient.escapeString(userGuid.toString()));
8406+
.replaceAll("\\{" + "category_guid" + "\\}", localVarApiClient.escapeString(categoryGuid.toString()));
84098407

84108408
List<Pair> localVarQueryParams = new ArrayList<Pair>();
84118409
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
@@ -8434,20 +8432,15 @@ public okhttp3.Call readDefaultCategoryCall(String categoryGuid, String userGuid
84348432
}
84358433

84368434
@SuppressWarnings("rawtypes")
8437-
private okhttp3.Call readDefaultCategoryValidateBeforeCall(String categoryGuid, String userGuid, final ApiCallback _callback) throws ApiException {
8435+
private okhttp3.Call readDefaultCategoryValidateBeforeCall(String categoryGuid, final ApiCallback _callback) throws ApiException {
84388436

84398437
// verify the required parameter 'categoryGuid' is set
84408438
if (categoryGuid == null) {
84418439
throw new ApiException("Missing the required parameter 'categoryGuid' when calling readDefaultCategory(Async)");
84428440
}
84438441

8444-
// verify the required parameter 'userGuid' is set
8445-
if (userGuid == null) {
8446-
throw new ApiException("Missing the required parameter 'userGuid' when calling readDefaultCategory(Async)");
8447-
}
8448-
84498442

8450-
okhttp3.Call localVarCall = readDefaultCategoryCall(categoryGuid, userGuid, _callback);
8443+
okhttp3.Call localVarCall = readDefaultCategoryCall(categoryGuid, _callback);
84518444
return localVarCall;
84528445

84538446
}
@@ -8456,7 +8449,6 @@ private okhttp3.Call readDefaultCategoryValidateBeforeCall(String categoryGuid,
84568449
* Read a default category
84578450
* Use this endpoint to read the attributes of a default category.
84588451
* @param categoryGuid The unique id for a &#x60;category&#x60;. (required)
8459-
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
84608452
* @return CategoryResponseBody
84618453
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
84628454
* @http.response.details
@@ -8465,16 +8457,15 @@ private okhttp3.Call readDefaultCategoryValidateBeforeCall(String categoryGuid,
84658457
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
84668458
</table>
84678459
*/
8468-
public CategoryResponseBody readDefaultCategory(String categoryGuid, String userGuid) throws ApiException {
8469-
ApiResponse<CategoryResponseBody> localVarResp = readDefaultCategoryWithHttpInfo(categoryGuid, userGuid);
8460+
public CategoryResponseBody readDefaultCategory(String categoryGuid) throws ApiException {
8461+
ApiResponse<CategoryResponseBody> localVarResp = readDefaultCategoryWithHttpInfo(categoryGuid);
84708462
return localVarResp.getData();
84718463
}
84728464

84738465
/**
84748466
* Read a default category
84758467
* Use this endpoint to read the attributes of a default category.
84768468
* @param categoryGuid The unique id for a &#x60;category&#x60;. (required)
8477-
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
84788469
* @return ApiResponse&lt;CategoryResponseBody&gt;
84798470
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
84808471
* @http.response.details
@@ -8483,8 +8474,8 @@ public CategoryResponseBody readDefaultCategory(String categoryGuid, String user
84838474
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
84848475
</table>
84858476
*/
8486-
public ApiResponse<CategoryResponseBody> readDefaultCategoryWithHttpInfo(String categoryGuid, String userGuid) throws ApiException {
8487-
okhttp3.Call localVarCall = readDefaultCategoryValidateBeforeCall(categoryGuid, userGuid, null);
8477+
public ApiResponse<CategoryResponseBody> readDefaultCategoryWithHttpInfo(String categoryGuid) throws ApiException {
8478+
okhttp3.Call localVarCall = readDefaultCategoryValidateBeforeCall(categoryGuid, null);
84888479
Type localVarReturnType = new TypeToken<CategoryResponseBody>(){}.getType();
84898480
return localVarApiClient.execute(localVarCall, localVarReturnType);
84908481
}
@@ -8493,7 +8484,6 @@ public ApiResponse<CategoryResponseBody> readDefaultCategoryWithHttpInfo(String
84938484
* Read a default category (asynchronously)
84948485
* Use this endpoint to read the attributes of a default category.
84958486
* @param categoryGuid The unique id for a &#x60;category&#x60;. (required)
8496-
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
84978487
* @param _callback The callback to be executed when the API call finishes
84988488
* @return The request call
84998489
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -8503,9 +8493,9 @@ public ApiResponse<CategoryResponseBody> readDefaultCategoryWithHttpInfo(String
85038493
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
85048494
</table>
85058495
*/
8506-
public okhttp3.Call readDefaultCategoryAsync(String categoryGuid, String userGuid, final ApiCallback<CategoryResponseBody> _callback) throws ApiException {
8496+
public okhttp3.Call readDefaultCategoryAsync(String categoryGuid, final ApiCallback<CategoryResponseBody> _callback) throws ApiException {
85078497

8508-
okhttp3.Call localVarCall = readDefaultCategoryValidateBeforeCall(categoryGuid, userGuid, _callback);
8498+
okhttp3.Call localVarCall = readDefaultCategoryValidateBeforeCall(categoryGuid, _callback);
85098499
Type localVarReturnType = new TypeToken<CategoryResponseBody>(){}.getType();
85108500
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
85118501
return localVarCall;
@@ -10573,7 +10563,7 @@ public okhttp3.Call readUserAsync(String userGuid, final ApiCallback<UserRespons
1057310563
/**
1057410564
* Build call for requestConnectWidgetURL
1057510565
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
10576-
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (optional)
10566+
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (required)
1057710567
* @param _callback Callback for upload/download progress
1057810568
* @return Call to execute
1057910569
* @throws ApiException If fail to serialize the request body object
@@ -10638,6 +10628,11 @@ private okhttp3.Call requestConnectWidgetURLValidateBeforeCall(String userGuid,
1063810628
throw new ApiException("Missing the required parameter 'userGuid' when calling requestConnectWidgetURL(Async)");
1063910629
}
1064010630

10631+
// verify the required parameter 'connectWidgetRequestBody' is set
10632+
if (connectWidgetRequestBody == null) {
10633+
throw new ApiException("Missing the required parameter 'connectWidgetRequestBody' when calling requestConnectWidgetURL(Async)");
10634+
}
10635+
1064110636

1064210637
okhttp3.Call localVarCall = requestConnectWidgetURLCall(userGuid, connectWidgetRequestBody, _callback);
1064310638
return localVarCall;
@@ -10648,7 +10643,7 @@ private okhttp3.Call requestConnectWidgetURLValidateBeforeCall(String userGuid,
1064810643
* Request connect widget url
1064910644
* This endpoint will return a URL for an embeddable version of MX Connect.
1065010645
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
10651-
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (optional)
10646+
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (required)
1065210647
* @return ConnectWidgetResponseBody
1065310648
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1065410649
* @http.response.details
@@ -10666,7 +10661,7 @@ public ConnectWidgetResponseBody requestConnectWidgetURL(String userGuid, Connec
1066610661
* Request connect widget url
1066710662
* This endpoint will return a URL for an embeddable version of MX Connect.
1066810663
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
10669-
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (optional)
10664+
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (required)
1067010665
* @return ApiResponse&lt;ConnectWidgetResponseBody&gt;
1067110666
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1067210667
* @http.response.details
@@ -10685,7 +10680,7 @@ public ApiResponse<ConnectWidgetResponseBody> requestConnectWidgetURLWithHttpInf
1068510680
* Request connect widget url (asynchronously)
1068610681
* This endpoint will return a URL for an embeddable version of MX Connect.
1068710682
* @param userGuid The unique id for a &#x60;user&#x60;. (required)
10688-
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (optional)
10683+
* @param connectWidgetRequestBody Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) (required)
1068910684
* @param _callback The callback to be executed when the API call finishes
1069010685
* @return The request call
1069110686
* @throws ApiException If fail to process the API call, e.g. serializing the request body object

src/test/java/com/mx/client/mx_platform_api/MxPlatformApiTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,7 @@ public void readCategoryTest() throws ApiException {
10711071
@Test
10721072
public void readDefaultCategoryTest() throws ApiException {
10731073
String categoryGuid = null;
1074-
String userGuid = null;
1075-
CategoryResponseBody response = api.readDefaultCategory(categoryGuid, userGuid);
1074+
CategoryResponseBody response = api.readDefaultCategory(categoryGuid);
10761075
// TODO: test validations
10771076
}
10781077

0 commit comments

Comments
 (0)