mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-05-31 07:01:55 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**assets** | [**List<Attachment>**](Attachment.md) | | [optional]
|
||||
**body** | **String** | | [optional]
|
||||
**createdAt** | [**Date**](Date.md) | | [optional]
|
||||
**htmlUrl** | **String** | | [optional]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# IdAssetsBody1
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**attachment** | [**File**](File.md) | attachment to upload |
|
||||
@@ -0,0 +1,6 @@
|
||||
# IndexAssetsBody
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**attachment** | [**File**](File.md) | attachment to upload |
|
||||
@@ -3,6 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**assets** | [**List<Attachment>**](Attachment.md) | | [optional]
|
||||
**assignee** | [**User**](User.md) | | [optional]
|
||||
**assignees** | [**List<User>**](User.md) | | [optional]
|
||||
**body** | **String** | | [optional]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,16 @@ package org.gitnex.tea4j.v2.apis;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import okhttp3.RequestBody;
|
||||
import org.gitnex.tea4j.v2.CollectionFormats.*;
|
||||
import org.gitnex.tea4j.v2.models.AddTimeOption;
|
||||
import org.gitnex.tea4j.v2.models.Attachment;
|
||||
import org.gitnex.tea4j.v2.models.Comment;
|
||||
import org.gitnex.tea4j.v2.models.CreateIssueCommentOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateIssueOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateLabelOption;
|
||||
import org.gitnex.tea4j.v2.models.CreateMilestoneOption;
|
||||
import org.gitnex.tea4j.v2.models.EditAttachmentOptions;
|
||||
import org.gitnex.tea4j.v2.models.EditDeadlineOption;
|
||||
import org.gitnex.tea4j.v2.models.EditIssueCommentOption;
|
||||
import org.gitnex.tea4j.v2.models.EditIssueOption;
|
||||
@@ -140,6 +143,44 @@ public interface IssueApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body CreateIssueOption body);
|
||||
|
||||
/**
|
||||
* Create an issue attachment
|
||||
*
|
||||
* @param attachment (required)
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue (required)
|
||||
* @param name name of the attachment (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("repos/{owner}/{repo}/issues/{index}/assets")
|
||||
Call<Attachment> issueCreateIssueAttachment(
|
||||
@retrofit2.http.Part("attachment\"; filename=\"attachment") RequestBody attachment,
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Query("name") String name);
|
||||
|
||||
/**
|
||||
* Create a comment attachment
|
||||
*
|
||||
* @param attachment (required)
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the comment (required)
|
||||
* @param name name of the attachment (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("repos/{owner}/{repo}/issues/comments/{id}/assets")
|
||||
Call<Attachment> issueCreateIssueCommentAttachment(
|
||||
@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.Query("name") String name);
|
||||
|
||||
/**
|
||||
* Create a label
|
||||
*
|
||||
@@ -231,6 +272,38 @@ public interface IssueApi {
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Body EditReactionOption body);
|
||||
|
||||
/**
|
||||
* Delete an issue attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue (required)
|
||||
* @param attachmentId id of the attachment to delete (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}")
|
||||
Call<Void> issueDeleteIssueAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId);
|
||||
|
||||
/**
|
||||
* Delete a comment attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the comment (required)
|
||||
* @param attachmentId id of the attachment to delete (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}")
|
||||
Call<Void> issueDeleteIssueCommentAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId);
|
||||
|
||||
/**
|
||||
* Remove a reaction from an issue
|
||||
*
|
||||
@@ -376,6 +449,44 @@ public interface IssueApi {
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Body EditIssueOption body);
|
||||
|
||||
/**
|
||||
* Edit an issue attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue (required)
|
||||
* @param attachmentId id of the attachment to edit (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@PATCH("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}")
|
||||
Call<Attachment> issueEditIssueAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId,
|
||||
@retrofit2.http.Body EditAttachmentOptions body);
|
||||
|
||||
/**
|
||||
* Edit a comment attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the comment (required)
|
||||
* @param attachmentId id of the attachment to edit (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@PATCH("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}")
|
||||
Call<Attachment> issueEditIssueCommentAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId,
|
||||
@retrofit2.http.Body EditAttachmentOptions body);
|
||||
|
||||
/**
|
||||
* Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date
|
||||
* will be taken into account, and time of day ignored.
|
||||
@@ -514,6 +625,38 @@ public interface IssueApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
|
||||
/**
|
||||
* Get an issue attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue (required)
|
||||
* @param attachmentId id of the attachment to get (required)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}")
|
||||
Call<Attachment> issueGetIssueAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId);
|
||||
|
||||
/**
|
||||
* Get a comment attachment
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the comment (required)
|
||||
* @param attachmentId id of the attachment to get (required)
|
||||
* @return Call<Attachment>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}")
|
||||
Call<Attachment> issueGetIssueCommentAttachment(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id,
|
||||
@retrofit2.http.Path("attachment_id") Long attachmentId);
|
||||
|
||||
/**
|
||||
* Get a list reactions of an issue
|
||||
*
|
||||
@@ -617,6 +760,34 @@ public interface IssueApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* List issue's attachments
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the issue (required)
|
||||
* @return Call<List<Attachment>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/issues/{index}/assets")
|
||||
Call<List<Attachment>> issueListIssueAttachments(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
|
||||
/**
|
||||
* List comment's attachments
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param id id of the comment (required)
|
||||
* @return Call<List<Attachment>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/issues/comments/{id}/assets")
|
||||
Call<List<Attachment>> issueListIssueCommentAttachments(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("id") Long id);
|
||||
|
||||
/**
|
||||
* List a repository's issues
|
||||
*
|
||||
|
||||
@@ -15,7 +15,9 @@ 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.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Comment represents a comment on a commit or issue */
|
||||
@@ -23,6 +25,9 @@ import java.util.Objects;
|
||||
public class Comment implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("assets")
|
||||
private List<Attachment> assets = null;
|
||||
|
||||
@SerializedName("body")
|
||||
private String body = null;
|
||||
|
||||
@@ -53,6 +58,33 @@ public class Comment implements Serializable {
|
||||
@SerializedName("user")
|
||||
private User user = null;
|
||||
|
||||
public Comment assets(List<Attachment> assets) {
|
||||
this.assets = assets;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Comment addAssetsItem(Attachment assetsItem) {
|
||||
if (this.assets == null) {
|
||||
this.assets = new ArrayList<>();
|
||||
}
|
||||
this.assets.add(assetsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assets
|
||||
*
|
||||
* @return assets
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<Attachment> getAssets() {
|
||||
return assets;
|
||||
}
|
||||
|
||||
public void setAssets(List<Attachment> assets) {
|
||||
this.assets = assets;
|
||||
}
|
||||
|
||||
public Comment body(String body) {
|
||||
this.body = body;
|
||||
return this;
|
||||
@@ -252,7 +284,8 @@ public class Comment implements Serializable {
|
||||
return false;
|
||||
}
|
||||
Comment comment = (Comment) o;
|
||||
return Objects.equals(this.body, comment.body)
|
||||
return Objects.equals(this.assets, comment.assets)
|
||||
&& Objects.equals(this.body, comment.body)
|
||||
&& Objects.equals(this.createdAt, comment.createdAt)
|
||||
&& Objects.equals(this.htmlUrl, comment.htmlUrl)
|
||||
&& Objects.equals(this.id, comment.id)
|
||||
@@ -267,6 +300,7 @@ public class Comment implements Serializable {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
assets,
|
||||
body,
|
||||
createdAt,
|
||||
htmlUrl,
|
||||
@@ -284,6 +318,7 @@ public class Comment implements Serializable {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Comment {\n");
|
||||
|
||||
sb.append(" assets: ").append(toIndentedString(assets)).append("\n");
|
||||
sb.append(" body: ").append(toIndentedString(body)).append("\n");
|
||||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
||||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** IdAssetsBody1 */
|
||||
public class IdAssetsBody1 implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("attachment")
|
||||
private File attachment = null;
|
||||
|
||||
public IdAssetsBody1 attachment(File attachment) {
|
||||
this.attachment = attachment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* attachment to upload
|
||||
*
|
||||
* @return attachment
|
||||
*/
|
||||
@Schema(required = true, 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;
|
||||
}
|
||||
IdAssetsBody1 idAssetsBody1 = (IdAssetsBody1) o;
|
||||
return Objects.equals(this.attachment, idAssetsBody1.attachment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(Objects.hashCode(attachment));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IdAssetsBody1 {\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 ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** IndexAssetsBody */
|
||||
public class IndexAssetsBody implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("attachment")
|
||||
private File attachment = null;
|
||||
|
||||
public IndexAssetsBody attachment(File attachment) {
|
||||
this.attachment = attachment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* attachment to upload
|
||||
*
|
||||
* @return attachment
|
||||
*/
|
||||
@Schema(required = true, 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;
|
||||
}
|
||||
IndexAssetsBody indexAssetsBody = (IndexAssetsBody) o;
|
||||
return Objects.equals(this.attachment, indexAssetsBody.attachment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(Objects.hashCode(attachment));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IndexAssetsBody {\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 ");
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,9 @@ import java.util.Objects;
|
||||
public class Issue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("assets")
|
||||
private List<Attachment> assets = null;
|
||||
|
||||
@SerializedName("assignee")
|
||||
private User assignee = null;
|
||||
|
||||
@@ -94,6 +97,33 @@ public class Issue implements Serializable {
|
||||
@SerializedName("user")
|
||||
private User user = null;
|
||||
|
||||
public Issue assets(List<Attachment> assets) {
|
||||
this.assets = assets;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Issue addAssetsItem(Attachment assetsItem) {
|
||||
if (this.assets == null) {
|
||||
this.assets = new ArrayList<>();
|
||||
}
|
||||
this.assets.add(assetsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assets
|
||||
*
|
||||
* @return assets
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<Attachment> getAssets() {
|
||||
return assets;
|
||||
}
|
||||
|
||||
public void setAssets(List<Attachment> assets) {
|
||||
this.assets = assets;
|
||||
}
|
||||
|
||||
public Issue assignee(User assignee) {
|
||||
this.assignee = assignee;
|
||||
return this;
|
||||
@@ -556,7 +586,8 @@ public class Issue implements Serializable {
|
||||
return false;
|
||||
}
|
||||
Issue issue = (Issue) o;
|
||||
return Objects.equals(this.assignee, issue.assignee)
|
||||
return Objects.equals(this.assets, issue.assets)
|
||||
&& Objects.equals(this.assignee, issue.assignee)
|
||||
&& Objects.equals(this.assignees, issue.assignees)
|
||||
&& Objects.equals(this.body, issue.body)
|
||||
&& Objects.equals(this.closedAt, issue.closedAt)
|
||||
@@ -584,6 +615,7 @@ public class Issue implements Serializable {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
assets,
|
||||
assignee,
|
||||
assignees,
|
||||
body,
|
||||
@@ -614,6 +646,7 @@ public class Issue implements Serializable {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Issue {\n");
|
||||
|
||||
sb.append(" assets: ").append(toIndentedString(assets)).append("\n");
|
||||
sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n");
|
||||
sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n");
|
||||
sb.append(" body: ").append(toIndentedString(body)).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user