Fix token swagger
Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
204c6683cd
commit
dcfe46ca63
|
|
@ -1,4 +1,4 @@
|
|||
# swagger-java-client
|
||||
# java-gitea-api
|
||||
|
||||
Gitea API.
|
||||
- API version: 1.14.0&#43;dev-803-gf1da46622
|
||||
|
|
@ -37,9 +37,9 @@ Add this dependency to your project's POM:
|
|||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-java-client</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<groupId>io.gitea</groupId>
|
||||
<artifactId>java-gitea-api</artifactId>
|
||||
<version>1.14.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ Name | Type | Description | Notes
|
|||
|
||||
<a name="userCreateToken"></a>
|
||||
# **userCreateToken**
|
||||
> userCreateToken(username, accessToken)
|
||||
> AccessToken userCreateToken(username, accessToken)
|
||||
|
||||
Create an access token
|
||||
|
||||
|
|
@ -467,7 +467,8 @@ UserApi apiInstance = new UserApi();
|
|||
String username = "username_example"; // String | username of user
|
||||
AccessToken accessToken = new AccessToken(); // AccessToken |
|
||||
try {
|
||||
apiInstance.userCreateToken(username, accessToken);
|
||||
AccessToken result = apiInstance.userCreateToken(username, accessToken);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#userCreateToken");
|
||||
e.printStackTrace();
|
||||
|
|
@ -483,7 +484,7 @@ Name | Type | Description | Notes
|
|||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
[**AccessToken**](AccessToken.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
|
|
|||
|
|
@ -627,10 +627,12 @@ public class UserApi {
|
|||
*
|
||||
* @param username username of user (required)
|
||||
* @param accessToken (optional)
|
||||
* @return AccessToken
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void userCreateToken(String username, AccessToken accessToken) throws ApiException {
|
||||
userCreateTokenWithHttpInfo(username, accessToken);
|
||||
public AccessToken userCreateToken(String username, AccessToken accessToken) throws ApiException {
|
||||
ApiResponse<AccessToken> resp = userCreateTokenWithHttpInfo(username, accessToken);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -638,12 +640,13 @@ public class UserApi {
|
|||
*
|
||||
* @param username username of user (required)
|
||||
* @param accessToken (optional)
|
||||
* @return ApiResponse<Void>
|
||||
* @return ApiResponse<AccessToken>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> userCreateTokenWithHttpInfo(String username, AccessToken accessToken) throws ApiException {
|
||||
public ApiResponse<AccessToken> userCreateTokenWithHttpInfo(String username, AccessToken accessToken) throws ApiException {
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, null, null);
|
||||
return apiClient.execute(call);
|
||||
Type localVarReturnType = new TypeToken<AccessToken>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -655,7 +658,7 @@ public class UserApi {
|
|||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call userCreateTokenAsync(String username, AccessToken accessToken, final ApiCallback<Void> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call userCreateTokenAsync(String username, AccessToken accessToken, final ApiCallback<AccessToken> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
|
|
@ -677,7 +680,8 @@ public class UserApi {
|
|||
}
|
||||
|
||||
com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
Type localVarReturnType = new TypeToken<AccessToken>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16298,20 +16298,8 @@
|
|||
"responses": {
|
||||
"AccessToken": {
|
||||
"description": "AccessToken represents an API access token.",
|
||||
"headers": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sha1": {
|
||||
"type": "string"
|
||||
},
|
||||
"token_last_eight": {
|
||||
"type": "string"
|
||||
}
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AccessToken"
|
||||
}
|
||||
},
|
||||
"AccessTokenList": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue