Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2026-03-02 00:03:21 +00:00
parent 94390b73da
commit 8f195637a0
6 changed files with 152 additions and 100 deletions
@@ -8,7 +8,6 @@ import org.gitnex.tea4j.v2.models.LicenseTemplateInfo;
import org.gitnex.tea4j.v2.models.LicensesTemplateListEntry;
import org.gitnex.tea4j.v2.models.MarkdownOption;
import org.gitnex.tea4j.v2.models.MarkupOption;
import org.gitnex.tea4j.v2.models.NodeInfo;
import org.gitnex.tea4j.v2.models.ServerVersion;
import retrofit2.Call;
import retrofit2.http.*;
@@ -41,14 +40,6 @@ public interface MiscellaneousApi {
@GET("licenses/{name}")
Call<LicenseTemplateInfo> getLicenseTemplateInfo(@retrofit2.http.Path("name") String name);
/**
* Returns the nodeinfo of the Gitea application
*
* @return Call&lt;NodeInfo&gt;
*/
@GET("nodeinfo")
Call<NodeInfo> getNodeInfo();
/**
* Get default signing-key.gpg
*
@@ -91,6 +91,7 @@ import org.gitnex.tea4j.v2.models.RenameBranchRepoOption;
import org.gitnex.tea4j.v2.models.RepoCollaboratorPermission;
import org.gitnex.tea4j.v2.models.RepoTopicOptions;
import org.gitnex.tea4j.v2.models.Repository;
import org.gitnex.tea4j.v2.models.RunDetails;
import org.gitnex.tea4j.v2.models.SearchResults;
import org.gitnex.tea4j.v2.models.Secret;
import org.gitnex.tea4j.v2.models.SubmitPullReviewOptions;
@@ -147,15 +148,18 @@ public interface RepositoryApi {
* @param repo name of the repo (required)
* @param workflowId id of the workflow (required)
* @param body (optional)
* @return Call&lt;Void&gt;
* @param returnRunDetails Whether the response should include the workflow run ID and URLs.
* (optional)
* @return Call&lt;RunDetails&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches")
Call<Void> actionsDispatchWorkflow(
Call<RunDetails> actionsDispatchWorkflow(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("workflow_id") String workflowId,
@retrofit2.http.Body CreateActionWorkflowDispatch body);
@retrofit2.http.Body CreateActionWorkflowDispatch body,
@retrofit2.http.Query("return_run_details") Boolean returnRunDetails);
/**
* Enable a workflow
@@ -0,0 +1,131 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{.SwaggerAppVer}}
*
*
* 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;
/** RunDetails returns workflow_dispatch runid and url */
@Schema(description = "RunDetails returns workflow_dispatch runid and url")
public class RunDetails implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("html_url")
private String htmlUrl = null;
@SerializedName("run_url")
private String runUrl = null;
@SerializedName("workflow_run_id")
private Long workflowRunId = null;
public RunDetails htmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
return this;
}
/**
* Get htmlUrl
*
* @return htmlUrl
*/
@Schema(description = "")
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public RunDetails runUrl(String runUrl) {
this.runUrl = runUrl;
return this;
}
/**
* Get runUrl
*
* @return runUrl
*/
@Schema(description = "")
public String getRunUrl() {
return runUrl;
}
public void setRunUrl(String runUrl) {
this.runUrl = runUrl;
}
public RunDetails workflowRunId(Long workflowRunId) {
this.workflowRunId = workflowRunId;
return this;
}
/**
* Get workflowRunId
*
* @return workflowRunId
*/
@Schema(description = "")
public Long getWorkflowRunId() {
return workflowRunId;
}
public void setWorkflowRunId(Long workflowRunId) {
this.workflowRunId = workflowRunId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RunDetails runDetails = (RunDetails) o;
return Objects.equals(this.htmlUrl, runDetails.htmlUrl)
&& Objects.equals(this.runUrl, runDetails.runUrl)
&& Objects.equals(this.workflowRunId, runDetails.workflowRunId);
}
@Override
public int hashCode() {
return Objects.hash(htmlUrl, runUrl, workflowRunId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RunDetails {\n");
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
sb.append(" runUrl: ").append(toIndentedString(runUrl)).append("\n");
sb.append(" workflowRunId: ").append(toIndentedString(workflowRunId)).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 ");
}
}