Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-04-28 00:11:46 +00:00
parent a207cf48d3
commit e5720459cd
4 changed files with 304 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
# GitignoreTemplateInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**source** | **String** | | [optional]
+172
View File
@@ -4,15 +4,104 @@ All URIs are relative to *http://{{AppSubUrl | JSEscape | Safe}}/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getGitignoreTemplateInfo**](MiscellaneousApi.md#getGitignoreTemplateInfo) | **GET** gitignore/templates/{name} | Returns information about a gitignore template
[**getLicenseTemplateInfo**](MiscellaneousApi.md#getLicenseTemplateInfo) | **GET** licenses/{name} | Returns information about a license template
[**getNodeInfo**](MiscellaneousApi.md#getNodeInfo) | **GET** nodeinfo | Returns the nodeinfo of the Gitea application
[**getSigningKey**](MiscellaneousApi.md#getSigningKey) | **GET** signing-key.gpg | Get default signing-key.gpg
[**getVersion**](MiscellaneousApi.md#getVersion) | **GET** version | Returns the version of the Gitea application
[**listGitignoresTemplates**](MiscellaneousApi.md#listGitignoresTemplates) | **GET** gitignore/templates | Returns a list of all gitignore templates
[**listLicenseTemplates**](MiscellaneousApi.md#listLicenseTemplates) | **GET** licenses | Returns a list of all license templates
[**renderMarkdown**](MiscellaneousApi.md#renderMarkdown) | **POST** markdown | Render a markdown document as HTML
[**renderMarkdownRaw**](MiscellaneousApi.md#renderMarkdownRaw) | **POST** markdown/raw | Render raw markdown as HTML
[**renderMarkup**](MiscellaneousApi.md#renderMarkup) | **POST** markup | Render a markup document as HTML
<a name="getGitignoreTemplateInfo"></a>
# **getGitignoreTemplateInfo**
> GitignoreTemplateInfo getGitignoreTemplateInfo(name)
Returns information about a gitignore template
### 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.MiscellaneousApi;
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");
MiscellaneousApi apiInstance = new MiscellaneousApi();
String name = "name_example"; // String | name of the template
try {
GitignoreTemplateInfo result = apiInstance.getGitignoreTemplateInfo(name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MiscellaneousApi#getGitignoreTemplateInfo");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **String**| name of the template |
### Return type
[**GitignoreTemplateInfo**](GitignoreTemplateInfo.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**: application/json
<a name="getLicenseTemplateInfo"></a>
# **getLicenseTemplateInfo**
> LicenseTemplateInfo getLicenseTemplateInfo(name)
@@ -344,6 +433,89 @@ This endpoint does not need any parameter.
[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**: application/json
<a name="listGitignoresTemplates"></a>
# **listGitignoresTemplates**
> List&lt;String&gt; listGitignoresTemplates()
Returns a list of all gitignore templates
### 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.MiscellaneousApi;
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");
MiscellaneousApi apiInstance = new MiscellaneousApi();
try {
List<String> result = apiInstance.listGitignoresTemplates();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MiscellaneousApi#listGitignoresTemplates");
e.printStackTrace();
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List&lt;String&gt;**
### 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
@@ -2,6 +2,7 @@ package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.GitignoreTemplateInfo;
import org.gitnex.tea4j.v2.models.LicenseTemplateInfo;
import org.gitnex.tea4j.v2.models.LicensesTemplateListEntry;
import org.gitnex.tea4j.v2.models.MarkdownOption;
@@ -12,6 +13,15 @@ import retrofit2.Call;
import retrofit2.http.*;
public interface MiscellaneousApi {
/**
* Returns information about a gitignore template
*
* @param name name of the template (required)
* @return Call&lt;GitignoreTemplateInfo&gt;
*/
@GET("gitignore/templates/{name}")
Call<GitignoreTemplateInfo> getGitignoreTemplateInfo(@retrofit2.http.Path("name") String name);
/**
* Returns information about a license template
*
@@ -45,6 +55,14 @@ public interface MiscellaneousApi {
@GET("version")
Call<ServerVersion> getVersion();
/**
* Returns a list of all gitignore templates
*
* @return Call&lt;List&lt;String&gt;&gt;
*/
@GET("gitignore/templates")
Call<List<String>> listGitignoresTemplates();
/**
* Returns a list of all license templates
*
@@ -0,0 +1,107 @@
/*
* Gitea API.
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** GitignoreTemplateInfo name and text of a gitignore template */
@Schema(description = "GitignoreTemplateInfo name and text of a gitignore template")
public class GitignoreTemplateInfo implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name")
private String name = null;
@SerializedName("source")
private String source = null;
public GitignoreTemplateInfo name(String name) {
this.name = name;
return this;
}
/**
* Get name
*
* @return name
*/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public GitignoreTemplateInfo source(String source) {
this.source = source;
return this;
}
/**
* Get source
*
* @return source
*/
@Schema(description = "")
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GitignoreTemplateInfo gitignoreTemplateInfo = (GitignoreTemplateInfo) o;
return Objects.equals(this.name, gitignoreTemplateInfo.name)
&& Objects.equals(this.source, gitignoreTemplateInfo.source);
}
@Override
public int hashCode() {
return Objects.hash(name, source);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GitignoreTemplateInfo {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}