Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,758 changes: 2,758 additions & 0 deletions scripts/backend_api.yml

Large diffs are not rendered by default.

610 changes: 610 additions & 0 deletions scripts/common.yml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion scripts/generate-openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ cd .gen
rm -rf ../../src/main/java/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME
mkdir -p ../../src/main/java/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME

curl -s https://backendapi.cloud.corbado.io/v2/openapi.yaml -o backend_api.yml
cp ../backend_api.yml backend_api.yml
cp ../common.yml common.yml

docker pull openapitools/openapi-generator-cli
docker run -v ${PWD}:/local --user $(id -u):$(id -g) openapitools/openapi-generator-cli generate \
-i /local/backend_api.yml \
Expand Down
28 changes: 14 additions & 14 deletions src/main/java/com/corbado/generated/api/AuthEventsApi.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Corbado Backend API
* # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys.
* # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys.
*
* The version of the OpenAPI document: 2.0.0
* Contact: support@corbado.com
Expand Down Expand Up @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) {

/**
* Build call for authEventCreate
* @param userID ID of user (required)
* @param userID Unique identifier of the user. Format: `usr-<number>`. (required)
* @param authEventCreateReq (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
Expand All @@ -85,11 +85,11 @@ public void setCustomBaseUrl(String customBaseUrl) {
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Auth event has been created </td><td> - </td></tr>
<tr><td> 200 </td><td> Auth event has been created. </td><td> - </td></tr>
<tr><td> 0 </td><td> Error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call authEventCreateCall(String userID, AuthEventCreateReq authEventCreateReq, final ApiCallback _callback) throws ApiException {
public okhttp3.Call authEventCreateCall(@javax.annotation.Nonnull String userID, @javax.annotation.Nonnull AuthEventCreateReq authEventCreateReq, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
Expand Down Expand Up @@ -136,7 +136,7 @@ public okhttp3.Call authEventCreateCall(String userID, AuthEventCreateReq authEv
}

@SuppressWarnings("rawtypes")
private okhttp3.Call authEventCreateValidateBeforeCall(String userID, AuthEventCreateReq authEventCreateReq, final ApiCallback _callback) throws ApiException {
private okhttp3.Call authEventCreateValidateBeforeCall(@javax.annotation.Nonnull String userID, @javax.annotation.Nonnull AuthEventCreateReq authEventCreateReq, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'userID' is set
if (userID == null) {
throw new ApiException("Missing the required parameter 'userID' when calling authEventCreate(Async)");
Expand All @@ -154,39 +154,39 @@ private okhttp3.Call authEventCreateValidateBeforeCall(String userID, AuthEventC
/**
*
* Create a new authentication event for a user
* @param userID ID of user (required)
* @param userID Unique identifier of the user. Format: &#x60;usr-&lt;number&gt;&#x60;. (required)
* @param authEventCreateReq (required)
* @return AuthEvent
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Auth event has been created </td><td> - </td></tr>
<tr><td> 200 </td><td> Auth event has been created. </td><td> - </td></tr>
<tr><td> 0 </td><td> Error </td><td> - </td></tr>
</table>
*/
public AuthEvent authEventCreate(String userID, AuthEventCreateReq authEventCreateReq) throws ApiException {
public AuthEvent authEventCreate(@javax.annotation.Nonnull String userID, @javax.annotation.Nonnull AuthEventCreateReq authEventCreateReq) throws ApiException {
ApiResponse<AuthEvent> localVarResp = authEventCreateWithHttpInfo(userID, authEventCreateReq);
return localVarResp.getData();
}

/**
*
* Create a new authentication event for a user
* @param userID ID of user (required)
* @param userID Unique identifier of the user. Format: &#x60;usr-&lt;number&gt;&#x60;. (required)
* @param authEventCreateReq (required)
* @return ApiResponse&lt;AuthEvent&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Auth event has been created </td><td> - </td></tr>
<tr><td> 200 </td><td> Auth event has been created. </td><td> - </td></tr>
<tr><td> 0 </td><td> Error </td><td> - </td></tr>
</table>
*/
public ApiResponse<AuthEvent> authEventCreateWithHttpInfo(String userID, AuthEventCreateReq authEventCreateReq) throws ApiException {
public ApiResponse<AuthEvent> authEventCreateWithHttpInfo(@javax.annotation.Nonnull String userID, @javax.annotation.Nonnull AuthEventCreateReq authEventCreateReq) throws ApiException {
okhttp3.Call localVarCall = authEventCreateValidateBeforeCall(userID, authEventCreateReq, null);
Type localVarReturnType = new TypeToken<AuthEvent>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
Expand All @@ -195,7 +195,7 @@ public ApiResponse<AuthEvent> authEventCreateWithHttpInfo(String userID, AuthEve
/**
* (asynchronously)
* Create a new authentication event for a user
* @param userID ID of user (required)
* @param userID Unique identifier of the user. Format: &#x60;usr-&lt;number&gt;&#x60;. (required)
* @param authEventCreateReq (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
Expand All @@ -204,11 +204,11 @@ public ApiResponse<AuthEvent> authEventCreateWithHttpInfo(String userID, AuthEve
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Auth event has been created </td><td> - </td></tr>
<tr><td> 200 </td><td> Auth event has been created. </td><td> - </td></tr>
<tr><td> 0 </td><td> Error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call authEventCreateAsync(String userID, AuthEventCreateReq authEventCreateReq, final ApiCallback<AuthEvent> _callback) throws ApiException {
public okhttp3.Call authEventCreateAsync(@javax.annotation.Nonnull String userID, @javax.annotation.Nonnull AuthEventCreateReq authEventCreateReq, final ApiCallback<AuthEvent> _callback) throws ApiException {

okhttp3.Call localVarCall = authEventCreateValidateBeforeCall(userID, authEventCreateReq, _callback);
Type localVarReturnType = new TypeToken<AuthEvent>(){}.getType();
Expand Down
Loading
Loading