Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-03-29 00:03:34 +00:00
parent 5ca6fed34f
commit db1932a490
12 changed files with 1390 additions and 0 deletions
@@ -21,6 +21,7 @@ import org.gitnex.tea4j.v2.models.EditReactionOption;
import org.gitnex.tea4j.v2.models.Issue;
import org.gitnex.tea4j.v2.models.IssueDeadline;
import org.gitnex.tea4j.v2.models.IssueLabelsOption;
import org.gitnex.tea4j.v2.models.IssueMeta;
import org.gitnex.tea4j.v2.models.Label;
import org.gitnex.tea4j.v2.models.Milestone;
import org.gitnex.tea4j.v2.models.Reaction;
@@ -162,6 +163,23 @@ public interface IssueApi {
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Query("name") String name);
/**
* Block the issue given in the body by the issue in path
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call<Issue>
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/blocks")
Call<Issue> issueCreateIssueBlocking(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Body IssueMeta body);
/**
* Create a comment attachment
*
@@ -181,6 +199,23 @@ public interface IssueApi {
@retrofit2.http.Path("id") Long id,
@retrofit2.http.Query("name") String name);
/**
* Make the issue in the url depend on the issue in the form.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Issue&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/issues/{index}/dependencies")
Call<Issue> issueCreateIssueDependencies(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Body IssueMeta body);
/**
* Create a label
*
@@ -760,6 +795,24 @@ public interface IssueApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List issues that are blocked by this issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Issue&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/blocks")
Call<List<Issue>> issueListBlocks(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List issue&#x27;s attachments
*
@@ -788,6 +841,24 @@ public interface IssueApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* List an issue&#x27;s dependencies, i.e all issues that block this issue.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Issue&gt;&gt;
*/
@GET("repos/{owner}/{repo}/issues/{index}/dependencies")
Call<List<Issue>> issueListIssueDependencies(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List a repository&#x27;s issues
*
@@ -879,6 +950,40 @@ public interface IssueApi {
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body EditReactionOption body);
/**
* Unblock the issue given in the body by the issue in path
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Issue&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("repos/{owner}/{repo}/issues/{index}/blocks")
Call<Issue> issueRemoveIssueBlocking(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Body IssueMeta body);
/**
* Remove an issue dependency
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param index index of the issue (required)
* @param body (optional)
* @return Call&lt;Issue&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("repos/{owner}/{repo}/issues/{index}/dependencies")
Call<Issue> issueRemoveIssueDependencies(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("index") String index,
@retrofit2.http.Body IssueMeta body);
/**
* Remove a label from an issue
*
@@ -46,6 +46,8 @@ import org.gitnex.tea4j.v2.models.GitBlobResponse;
import org.gitnex.tea4j.v2.models.GitHook;
import org.gitnex.tea4j.v2.models.GitTreeResponse;
import org.gitnex.tea4j.v2.models.Hook;
import org.gitnex.tea4j.v2.models.IssueConfig;
import org.gitnex.tea4j.v2.models.IssueConfigValidation;
import org.gitnex.tea4j.v2.models.IssueTemplate;
import org.gitnex.tea4j.v2.models.MergePullRequestOption;
import org.gitnex.tea4j.v2.models.MigrateRepoOptions;
@@ -1173,6 +1175,17 @@ public interface RepositoryApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Long id);
/**
* Returns the issue config for a repo
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;IssueConfig&gt;
*/
@GET("repos/{owner}/{repo}/issue_config")
Call<IssueConfig> repoGetIssueConfig(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* Get available issue templates for a repository
*
@@ -2105,6 +2118,17 @@ public interface RepositoryApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body RepoTopicOptions body);
/**
* Returns the validation information for a issue config
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;IssueConfigValidation&gt;
*/
@GET("repos/{owner}/{repo}/issue_config/validate")
Call<IssueConfigValidation> repoValidateIssueConfig(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* search topics via keyword
*
@@ -0,0 +1,116 @@
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** IssueConfig */
public class IssueConfig implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("blank_issues_enabled")
private Boolean blankIssuesEnabled = null;
@SerializedName("contact_links")
private List<IssueConfigContactLink> contactLinks = null;
public IssueConfig blankIssuesEnabled(Boolean blankIssuesEnabled) {
this.blankIssuesEnabled = blankIssuesEnabled;
return this;
}
/**
* Get blankIssuesEnabled
*
* @return blankIssuesEnabled
*/
@Schema(description = "")
public Boolean isBlankIssuesEnabled() {
return blankIssuesEnabled;
}
public void setBlankIssuesEnabled(Boolean blankIssuesEnabled) {
this.blankIssuesEnabled = blankIssuesEnabled;
}
public IssueConfig contactLinks(List<IssueConfigContactLink> contactLinks) {
this.contactLinks = contactLinks;
return this;
}
public IssueConfig addContactLinksItem(IssueConfigContactLink contactLinksItem) {
if (this.contactLinks == null) {
this.contactLinks = new ArrayList<>();
}
this.contactLinks.add(contactLinksItem);
return this;
}
/**
* Get contactLinks
*
* @return contactLinks
*/
@Schema(description = "")
public List<IssueConfigContactLink> getContactLinks() {
return contactLinks;
}
public void setContactLinks(List<IssueConfigContactLink> contactLinks) {
this.contactLinks = contactLinks;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IssueConfig issueConfig = (IssueConfig) o;
return Objects.equals(this.blankIssuesEnabled, issueConfig.blankIssuesEnabled)
&& Objects.equals(this.contactLinks, issueConfig.contactLinks);
}
@Override
public int hashCode() {
return Objects.hash(blankIssuesEnabled, contactLinks);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IssueConfig {\n");
sb.append(" blankIssuesEnabled: ").append(toIndentedString(blankIssuesEnabled)).append("\n");
sb.append(" contactLinks: ").append(toIndentedString(contactLinks)).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 ");
}
}
@@ -0,0 +1,130 @@
/*
* 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;
/** IssueConfigContactLink */
public class IssueConfigContactLink implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("about")
private String about = null;
@SerializedName("name")
private String name = null;
@SerializedName("url")
private String url = null;
public IssueConfigContactLink about(String about) {
this.about = about;
return this;
}
/**
* Get about
*
* @return about
*/
@Schema(description = "")
public String getAbout() {
return about;
}
public void setAbout(String about) {
this.about = about;
}
public IssueConfigContactLink 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 IssueConfigContactLink url(String url) {
this.url = url;
return this;
}
/**
* Get url
*
* @return url
*/
@Schema(description = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IssueConfigContactLink issueConfigContactLink = (IssueConfigContactLink) o;
return Objects.equals(this.about, issueConfigContactLink.about)
&& Objects.equals(this.name, issueConfigContactLink.name)
&& Objects.equals(this.url, issueConfigContactLink.url);
}
@Override
public int hashCode() {
return Objects.hash(about, name, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IssueConfigContactLink {\n");
sb.append(" about: ").append(toIndentedString(about)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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 ");
}
}
@@ -0,0 +1,106 @@
/*
* 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;
/** IssueConfigValidation */
public class IssueConfigValidation implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("message")
private String message = null;
@SerializedName("valid")
private Boolean valid = null;
public IssueConfigValidation message(String message) {
this.message = message;
return this;
}
/**
* Get message
*
* @return message
*/
@Schema(description = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public IssueConfigValidation valid(Boolean valid) {
this.valid = valid;
return this;
}
/**
* Get valid
*
* @return valid
*/
@Schema(description = "")
public Boolean isValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IssueConfigValidation issueConfigValidation = (IssueConfigValidation) o;
return Objects.equals(this.message, issueConfigValidation.message)
&& Objects.equals(this.valid, issueConfigValidation.valid);
}
@Override
public int hashCode() {
return Objects.hash(message, valid);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IssueConfigValidation {\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" valid: ").append(toIndentedString(valid)).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 ");
}
}
@@ -0,0 +1,131 @@
/*
* 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;
/** IssueMeta basic issue information */
@Schema(description = "IssueMeta basic issue information")
public class IssueMeta implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("index")
private Long index = null;
@SerializedName("owner")
private String owner = null;
@SerializedName("repo")
private String repo = null;
public IssueMeta index(Long index) {
this.index = index;
return this;
}
/**
* Get index
*
* @return index
*/
@Schema(description = "")
public Long getIndex() {
return index;
}
public void setIndex(Long index) {
this.index = index;
}
public IssueMeta owner(String owner) {
this.owner = owner;
return this;
}
/**
* Get owner
*
* @return owner
*/
@Schema(description = "")
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public IssueMeta repo(String repo) {
this.repo = repo;
return this;
}
/**
* Get repo
*
* @return repo
*/
@Schema(description = "")
public String getRepo() {
return repo;
}
public void setRepo(String repo) {
this.repo = repo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IssueMeta issueMeta = (IssueMeta) o;
return Objects.equals(this.index, issueMeta.index)
&& Objects.equals(this.owner, issueMeta.owner)
&& Objects.equals(this.repo, issueMeta.repo);
}
@Override
public int hashCode() {
return Objects.hash(index, owner, repo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IssueMeta {\n");
sb.append(" index: ").append(toIndentedString(index)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" repo: ").append(toIndentedString(repo)).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 ");
}
}