mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-06 18:02:16 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -50,6 +50,7 @@ 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.IdAssetsBody2;
|
||||
import org.gitnex.tea4j.v2.models.Issue;
|
||||
import org.gitnex.tea4j.v2.models.IssueConfig;
|
||||
import org.gitnex.tea4j.v2.models.IssueConfigValidation;
|
||||
@@ -505,20 +506,39 @@ public interface RepositoryApi {
|
||||
/**
|
||||
* Create a release attachment
|
||||
*
|
||||
* @param attachment (required)
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the release (required)
|
||||
* @param attachment (optional)
|
||||
* @param name name of the attachment (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("repos/{owner}/{repo}/releases/{id}/assets")
|
||||
Call<Attachment> repoCreateReleaseAttachment(
|
||||
@retrofit2.http.Part("attachment\"; filename=\"attachment") RequestBody attachment,
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Part("attachment\"; filename=\"attachment") RequestBody attachment,
|
||||
@retrofit2.http.Query("name") String name);
|
||||
|
||||
/**
|
||||
* Create a release attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the release (required)
|
||||
* @param body (optional)
|
||||
* @param name name of the attachment (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("repos/{owner}/{repo}/releases/{id}/assets")
|
||||
Call<Attachment> repoCreateReleaseAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Body IdAssetsBody2 body,
|
||||
@retrofit2.http.Query("name") String name);
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ public class IdAssetsBody1 implements Serializable {
|
||||
*
|
||||
* @return attachment
|
||||
*/
|
||||
@Schema(required = true, description = "attachment to upload")
|
||||
@Schema(description = "attachment to upload")
|
||||
public File getAttachment() {
|
||||
return attachment;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Gitea API
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape}}
|
||||
*
|
||||
*
|
||||
* 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.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** IdAssetsBody2 */
|
||||
public class IdAssetsBody2 implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("attachment")
|
||||
private File attachment = null;
|
||||
|
||||
public IdAssetsBody2 attachment(File attachment) {
|
||||
this.attachment = attachment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* attachment to upload
|
||||
*
|
||||
* @return attachment
|
||||
*/
|
||||
@Schema(description = "attachment to upload")
|
||||
public File getAttachment() {
|
||||
return attachment;
|
||||
}
|
||||
|
||||
public void setAttachment(File attachment) {
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IdAssetsBody2 idAssetsBody2 = (IdAssetsBody2) o;
|
||||
return Objects.equals(this.attachment, idAssetsBody2.attachment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(Objects.hashCode(attachment));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IdAssetsBody2 {\n");
|
||||
|
||||
sb.append(" attachment: ").append(toIndentedString(attachment)).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