mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-04 08:42:18 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -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<GitignoreTemplateInfo>
|
||||
*/
|
||||
@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<List<String>>
|
||||
*/
|
||||
@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 ");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user