Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2026-04-06 00:02:01 +00:00
parent 8946457151
commit 356be496be
2 changed files with 111 additions and 5 deletions
+96 -4
View File
@@ -4,7 +4,8 @@ All URIs are relative to *https://{{.SwaggerAppSubUrl}}/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deletePackage**](PackageApi.md#deletePackage) | **DELETE** packages/{owner}/{type}/{name}/{version} | Delete a package
[**deletePackage**](PackageApi.md#deletePackage) | **DELETE** packages/{owner}/{type}/{name} | Delete a package
[**deletePackageVersion**](PackageApi.md#deletePackageVersion) | **DELETE** packages/{owner}/{type}/{name}/{version} | Delete a package version
[**getLatestPackageVersion**](PackageApi.md#getLatestPackageVersion) | **GET** packages/{owner}/{type}/{name}/-/latest | Gets the latest version of a package
[**getPackage**](PackageApi.md#getPackage) | **GET** packages/{owner}/{type}/{name}/{version} | Gets a package
[**linkPackage**](PackageApi.md#linkPackage) | **POST** packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository
@@ -15,7 +16,7 @@ Method | HTTP request | Description
<a name="deletePackage"></a>
# **deletePackage**
> Void deletePackage(owner, type, name, version)
> Void deletePackage(owner, type, name)
Delete a package
@@ -74,9 +75,8 @@ PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the package
String type = "type_example"; // String | type of the package
String name = "name_example"; // String | name of the package
String version = "version_example"; // String | version of the package
try {
Void result = apiInstance.deletePackage(owner, type, name, version);
Void result = apiInstance.deletePackage(owner, type, name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#deletePackage");
@@ -86,6 +86,98 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the package |
**type** | **String**| type of the package |
**name** | **String**| name of the package |
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="deletePackageVersion"></a>
# **deletePackageVersion**
> Void deletePackageVersion(owner, type, name, version)
Delete a package version
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.PackageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
PackageApi apiInstance = new PackageApi();
String owner = "owner_example"; // String | owner of the package
String type = "type_example"; // String | type of the package
String name = "name_example"; // String | name of the package
String version = "version_example"; // String | version of the package
try {
Void result = apiInstance.deletePackageVersion(owner, type, name, version);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PackageApi#deletePackageVersion");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the package |
@@ -14,11 +14,25 @@ public interface PackageApi {
* @param owner owner of the package (required)
* @param type type of the package (required)
* @param name name of the package (required)
* @return Call&lt;Void&gt;
*/
@DELETE("packages/{owner}/{type}/{name}")
Call<Void> deletePackage(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("type") String type,
@retrofit2.http.Path("name") String name);
/**
* Delete a package version
*
* @param owner owner of the package (required)
* @param type type of the package (required)
* @param name name of the package (required)
* @param version version of the package (required)
* @return Call&lt;Void&gt;
*/
@DELETE("packages/{owner}/{type}/{name}/{version}")
Call<Void> deletePackage(
Call<Void> deletePackageVersion(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("type") String type,
@retrofit2.http.Path("name") String name,