Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-05-24 00:11:53 +00:00
parent 6abd46e78d
commit b3a39b74e4
4 changed files with 354 additions and 0 deletions
@@ -3,6 +3,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.LabelTemplate;
import org.gitnex.tea4j.v2.models.LicenseTemplateInfo;
import org.gitnex.tea4j.v2.models.LicensesTemplateListEntry;
import org.gitnex.tea4j.v2.models.MarkdownOption;
@@ -22,6 +23,15 @@ public interface MiscellaneousApi {
@GET("gitignore/templates/{name}")
Call<GitignoreTemplateInfo> getGitignoreTemplateInfo(@retrofit2.http.Path("name") String name);
/**
* Returns all labels in a template
*
* @param name name of the template (required)
* @return Call&lt;List&lt;LabelTemplate&gt;&gt;
*/
@GET("label/templates/{name}")
Call<List<LabelTemplate>> getLabelTemplateInfo(@retrofit2.http.Path("name") String name);
/**
* Returns information about a license template
*
@@ -63,6 +73,14 @@ public interface MiscellaneousApi {
@GET("gitignore/templates")
Call<List<String>> listGitignoresTemplates();
/**
* Returns a list of all label templates
*
* @return Call&lt;List&lt;String&gt;&gt;
*/
@GET("label/templates")
Call<List<String>> listLabelTemplates();
/**
* Returns a list of all license templates
*
@@ -0,0 +1,155 @@
/*
* 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;
/** LabelTemplate info of a Label template */
@Schema(description = "LabelTemplate info of a Label template")
public class LabelTemplate implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("color")
private String color = null;
@SerializedName("description")
private String description = null;
@SerializedName("exclusive")
private Boolean exclusive = null;
@SerializedName("name")
private String name = null;
public LabelTemplate color(String color) {
this.color = color;
return this;
}
/**
* Get color
*
* @return color
*/
@Schema(example = "00aabb", description = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public LabelTemplate description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public LabelTemplate exclusive(Boolean exclusive) {
this.exclusive = exclusive;
return this;
}
/**
* Get exclusive
*
* @return exclusive
*/
@Schema(example = "false", description = "")
public Boolean isExclusive() {
return exclusive;
}
public void setExclusive(Boolean exclusive) {
this.exclusive = exclusive;
}
public LabelTemplate 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;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LabelTemplate labelTemplate = (LabelTemplate) o;
return Objects.equals(this.color, labelTemplate.color)
&& Objects.equals(this.description, labelTemplate.description)
&& Objects.equals(this.exclusive, labelTemplate.exclusive)
&& Objects.equals(this.name, labelTemplate.name);
}
@Override
public int hashCode() {
return Objects.hash(color, description, exclusive, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LabelTemplate {\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" exclusive: ").append(toIndentedString(exclusive)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}