Generate new client version

This commit is contained in:
Niko Diamadis
2024-10-17 23:47:04 -04:00
parent 99a48aac54
commit ce8e111b86
66 changed files with 1424 additions and 716 deletions

View File

@@ -43,13 +43,17 @@ public class ApiClient {
public ApiClient(String[] authNames) {
this();
for(String authName : authNames) {
Interceptor auth;
if ("appTokenHeader".equals(authName)) {
Interceptor auth = null;
if ("appTokenAuthorizationHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "Authorization");
} else if ("appTokenHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "X-Gotify-Key");
} else if ("appTokenQuery".equals(authName)) {
auth = new ApiKeyAuth("query", "token");
} else if ("basicAuth".equals(authName)) {
auth = new HttpBasicAuth();
} else if ("clientTokenAuthorizationHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "Authorization");
} else if ("clientTokenHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "X-Gotify-Key");
} else if ("clientTokenQuery".equals(authName)) {
@@ -112,7 +116,7 @@ public class ApiClient {
json = new JSON();
okBuilder = new OkHttpClient.Builder();
String baseUrl = "http://localhost";
String baseUrl = "http://localhost/";
if (!baseUrl.endsWith("/"))
baseUrl = baseUrl + "/";

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,7 +10,6 @@
* Do not edit the class manually.
*/
package com.github.gotify.client;
import com.google.gson.Gson;

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
package com.github.gotify.client;
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@@ -9,6 +9,7 @@ import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import com.github.gotify.client.model.Application;
import com.github.gotify.client.model.ApplicationParams;
import com.github.gotify.client.model.Error;
import java.io.File;
@@ -29,7 +30,7 @@ public interface ApplicationApi {
})
@POST("application")
Call<Application> createApp(
@retrofit2.http.Body Application body
@retrofit2.http.Body ApplicationParams body
);
/**
@@ -38,9 +39,6 @@ public interface ApplicationApi {
* @param id the application id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("application/{id}")
Call<Void> deleteApp(
@retrofit2.http.Path("id") Long id
@@ -51,13 +49,21 @@ public interface ApplicationApi {
*
* @return Call&lt;List&lt;Application&gt;&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("application")
Call<List<Application>> getApps();
/**
* Deletes an image of an application.
*
* @param id the application id (required)
* @return Call&lt;Void&gt;
*/
@DELETE("application/{id}/image")
Call<Void> removeAppImage(
@retrofit2.http.Path("id") Long id
);
/**
* Update an application.
*
@@ -70,13 +76,13 @@ public interface ApplicationApi {
})
@PUT("application/{id}")
Call<Application> updateApplication(
@retrofit2.http.Body Application body, @retrofit2.http.Path("id") Long id
@retrofit2.http.Body ApplicationParams body, @retrofit2.http.Path("id") Long id
);
/**
* Upload an image for an application.
*
* @param file the application image (required)
* @param file (required)
* @param id the application id (required)
* @return Call&lt;Application&gt;
*/

View File

@@ -9,6 +9,7 @@ import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import com.github.gotify.client.model.Client;
import com.github.gotify.client.model.ClientParams;
import com.github.gotify.client.model.Error;
import java.util.ArrayList;
@@ -28,7 +29,7 @@ public interface ClientApi {
})
@POST("client")
Call<Client> createClient(
@retrofit2.http.Body Client body
@retrofit2.http.Body ClientParams body
);
/**
@@ -37,9 +38,6 @@ public interface ClientApi {
* @param id the client id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("client/{id}")
Call<Void> deleteClient(
@retrofit2.http.Path("id") Long id
@@ -50,9 +48,6 @@ public interface ClientApi {
*
* @return Call&lt;List&lt;Client&gt;&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("client")
Call<List<Client>> getClients();
@@ -69,7 +64,7 @@ public interface ClientApi {
})
@PUT("client/{id}")
Call<Client> updateClient(
@retrofit2.http.Body Client body, @retrofit2.http.Path("id") Long id
@retrofit2.http.Body ClientParams body, @retrofit2.http.Path("id") Long id
);
}

View File

@@ -21,9 +21,6 @@ public interface HealthApi {
*
* @return Call&lt;Health&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("health")
Call<Health> getHealth();

View File

@@ -38,9 +38,6 @@ public interface MessageApi {
* @param id the application id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("application/{id}/message")
Call<Void> deleteAppMessages(
@retrofit2.http.Path("id") Long id
@@ -52,9 +49,6 @@ public interface MessageApi {
* @param id the message id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("message/{id}")
Call<Void> deleteMessage(
@retrofit2.http.Path("id") Long id
@@ -65,9 +59,6 @@ public interface MessageApi {
*
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("message")
Call<Void> deleteMessages();
@@ -80,9 +71,6 @@ public interface MessageApi {
* @param since return all messages with an ID less than this value (optional)
* @return Call&lt;PagedMessages&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("application/{id}/message")
Call<PagedMessages> getAppMessages(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since
@@ -95,9 +83,6 @@ public interface MessageApi {
* @param since return all messages with an ID less than this value (optional)
* @return Call&lt;PagedMessages&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("message")
Call<PagedMessages> getMessages(
@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since
@@ -108,9 +93,6 @@ public interface MessageApi {
*
* @return Call&lt;Message&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("stream")
Call<Message> streamMessages();

View File

@@ -23,9 +23,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@POST("plugin/{id}/disable")
Call<Void> disablePlugin(
@retrofit2.http.Path("id") Long id
@@ -37,9 +34,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@POST("plugin/{id}/enable")
Call<Void> enablePlugin(
@retrofit2.http.Path("id") Long id
@@ -51,9 +45,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call&lt;Object&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("plugin/{id}/config")
Call<Object> getPluginConfig(
@retrofit2.http.Path("id") Long id
@@ -65,9 +56,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call&lt;String&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("plugin/{id}/display")
Call<String> getPluginDisplay(
@retrofit2.http.Path("id") Long id
@@ -78,9 +66,6 @@ public interface PluginApi {
*
* @return Call&lt;List&lt;PluginConf&gt;&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("plugin")
Call<List<PluginConf>> getPlugins();
@@ -91,9 +76,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/x-yaml"
})
@POST("plugin/{id}/config")
Call<Void> updatePluginConfig(
@retrofit2.http.Path("id") Long id

View File

@@ -8,10 +8,11 @@ import retrofit2.http.*;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import com.github.gotify.client.model.CreateUserExternal;
import com.github.gotify.client.model.Error;
import com.github.gotify.client.model.UpdateUserExternal;
import com.github.gotify.client.model.User;
import com.github.gotify.client.model.UserPass;
import com.github.gotify.client.model.UserWithPass;
import java.util.ArrayList;
import java.util.HashMap;
@@ -21,7 +22,7 @@ import java.util.Map;
public interface UserApi {
/**
* Create a user.
*
* With enabled registration: non admin users can be created without authentication. With disabled registrations: users can only be created by admin users.
* @param body the user to add (required)
* @return Call&lt;User&gt;
*/
@@ -30,7 +31,7 @@ public interface UserApi {
})
@POST("user")
Call<User> createUser(
@retrofit2.http.Body UserWithPass body
@retrofit2.http.Body CreateUserExternal body
);
/**
@@ -38,9 +39,6 @@ public interface UserApi {
*
* @return Call&lt;User&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("current/user")
Call<User> currentUser();
@@ -51,9 +49,6 @@ public interface UserApi {
* @param id the user id (required)
* @return Call&lt;Void&gt;
*/
@Headers({
"Content-Type:application/json"
})
@DELETE("user/{id}")
Call<Void> deleteUser(
@retrofit2.http.Path("id") Long id
@@ -65,9 +60,6 @@ public interface UserApi {
* @param id the user id (required)
* @return Call&lt;User&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("user/{id}")
Call<User> getUser(
@retrofit2.http.Path("id") Long id
@@ -78,9 +70,6 @@ public interface UserApi {
*
* @return Call&lt;List&lt;User&gt;&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("user")
Call<List<User>> getUsers();
@@ -102,8 +91,8 @@ public interface UserApi {
/**
* Update a user.
*
* @param id the user id (required)
* @param body the updated user (required)
* @param id the user id (required)
* @return Call&lt;User&gt;
*/
@Headers({
@@ -111,7 +100,7 @@ public interface UserApi {
})
@POST("user/{id}")
Call<User> updateUser(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Body UserWithPass body
@retrofit2.http.Body UpdateUserExternal body, @retrofit2.http.Path("id") Long id
);
}

View File

@@ -21,9 +21,6 @@ public interface VersionApi {
*
* @return Call&lt;VersionInfo&gt;
*/
@Headers({
"Content-Type:application/json"
})
@GET("version")
Call<VersionInfo> getVersion();

View File

@@ -113,8 +113,16 @@ public class OAuth implements Interceptor {
// 401/403 most likely indicates that access token has expired. Unless it happens two times in a row.
if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) {
if (updateAccessToken(requestAccessToken)) {
return retryingIntercept( chain, false );
if (response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure) {
try {
if (updateAccessToken(requestAccessToken)) {
response.body().close();
return retryingIntercept(chain, false);
}
} catch (Exception e) {
response.body().close();
throw e;
}
}
}
return response;

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,7 +10,6 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.auth;
public enum OAuthFlow {

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,24 +10,28 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* The Application holds information about an app which can send notifications.
*/
@ApiModel(description = "The Application holds information about an app which can send notifications.")
@Schema(description = "The Application holds information about an app which can send notifications.")
public class Application {
@SerializedName("defaultPriority")
private Long defaultPriority = null;
@SerializedName("description")
private String description = null;
@@ -40,12 +44,33 @@ public class Application {
@SerializedName("internal")
private Boolean internal = null;
@SerializedName("lastUsed")
private OffsetDateTime lastUsed = null;
@SerializedName("name")
private String name = null;
@SerializedName("token")
private String token = null;
public Application defaultPriority(Long defaultPriority) {
this.defaultPriority = defaultPriority;
return this;
}
/**
* The default priority of messages sent by this application. Defaults to 0.
* @return defaultPriority
**/
@Schema(example = "4", description = "The default priority of messages sent by this application. Defaults to 0.")
public Long getDefaultPriority() {
return defaultPriority;
}
public void setDefaultPriority(Long defaultPriority) {
this.defaultPriority = defaultPriority;
}
public Application description(String description) {
this.description = description;
return this;
@@ -55,7 +80,7 @@ public class Application {
* The description of the application.
* @return description
**/
@ApiModelProperty(example = "Backup server for the interwebs", required = true, value = "The description of the application.")
@Schema(example = "Backup server for the interwebs", required = true, description = "The description of the application.")
public String getDescription() {
return description;
}
@@ -68,7 +93,7 @@ public class Application {
* The application id.
* @return id
**/
@ApiModelProperty(example = "5", required = true, value = "The application id.")
@Schema(example = "5", required = true, description = "The application id.")
public Long getId() {
return id;
}
@@ -77,7 +102,7 @@ public class Application {
* The image of the application.
* @return image
**/
@ApiModelProperty(example = "image/image.jpeg", required = true, value = "The image of the application.")
@Schema(example = "image/image.jpeg", required = true, description = "The image of the application.")
public String getImage() {
return image;
}
@@ -86,11 +111,20 @@ public class Application {
* Whether the application is an internal application. Internal applications should not be deleted.
* @return internal
**/
@ApiModelProperty(example = "false", required = true, value = "Whether the application is an internal application. Internal applications should not be deleted.")
@Schema(example = "false", required = true, description = "Whether the application is an internal application. Internal applications should not be deleted.")
public Boolean isInternal() {
return internal;
}
/**
* The last time the application token was used.
* @return lastUsed
**/
@Schema(example = "2019-01-01T00:00Z", description = "The last time the application token was used.")
public OffsetDateTime getLastUsed() {
return lastUsed;
}
public Application name(String name) {
this.name = name;
return this;
@@ -100,7 +134,7 @@ public class Application {
* The application name. This is how the application should be displayed to the user.
* @return name
**/
@ApiModelProperty(example = "Backup Server", required = true, value = "The application name. This is how the application should be displayed to the user.")
@Schema(example = "Backup Server", required = true, description = "The application name. This is how the application should be displayed to the user.")
public String getName() {
return name;
}
@@ -113,7 +147,7 @@ public class Application {
* The application token. Can be used as &#x60;appToken&#x60;. See Authentication.
* @return token
**/
@ApiModelProperty(example = "AWH0wZ5r0Mbac.r", required = true, value = "The application token. Can be used as `appToken`. See Authentication.")
@Schema(example = "AWH0wZ5r0Mbac.r", required = true, description = "The application token. Can be used as `appToken`. See Authentication.")
public String getToken() {
return token;
}
@@ -128,17 +162,19 @@ public class Application {
return false;
}
Application application = (Application) o;
return Objects.equals(this.description, application.description) &&
return Objects.equals(this.defaultPriority, application.defaultPriority) &&
Objects.equals(this.description, application.description) &&
Objects.equals(this.id, application.id) &&
Objects.equals(this.image, application.image) &&
Objects.equals(this.internal, application.internal) &&
Objects.equals(this.lastUsed, application.lastUsed) &&
Objects.equals(this.name, application.name) &&
Objects.equals(this.token, application.token);
}
@Override
public int hashCode() {
return Objects.hash(description, id, image, internal, name, token);
return Objects.hash(defaultPriority, description, id, image, internal, lastUsed, name, token);
}
@@ -147,10 +183,12 @@ public class Application {
StringBuilder sb = new StringBuilder();
sb.append("class Application {\n");
sb.append(" defaultPriority: ").append(toIndentedString(defaultPriority)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" internal: ").append(toIndentedString(internal)).append("\n");
sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" token: ").append(toIndentedString(token)).append("\n");
sb.append("}");
@@ -169,4 +207,3 @@ public class Application {
}
}

View File

@@ -0,0 +1,138 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.2
*
*
* 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 com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* Params allowed to create or update Applications.
*/
@Schema(description = "Params allowed to create or update Applications.")
public class ApplicationParams {
@SerializedName("defaultPriority")
private Long defaultPriority = null;
@SerializedName("description")
private String description = null;
@SerializedName("name")
private String name = null;
public ApplicationParams defaultPriority(Long defaultPriority) {
this.defaultPriority = defaultPriority;
return this;
}
/**
* The default priority of messages sent by this application. Defaults to 0.
* @return defaultPriority
**/
@Schema(example = "5", description = "The default priority of messages sent by this application. Defaults to 0.")
public Long getDefaultPriority() {
return defaultPriority;
}
public void setDefaultPriority(Long defaultPriority) {
this.defaultPriority = defaultPriority;
}
public ApplicationParams description(String description) {
this.description = description;
return this;
}
/**
* The description of the application.
* @return description
**/
@Schema(example = "Backup server for the interwebs", description = "The description of the application.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ApplicationParams name(String name) {
this.name = name;
return this;
}
/**
* The application name. This is how the application should be displayed to the user.
* @return name
**/
@Schema(example = "Backup Server", required = true, description = "The application name. This is how the application should be displayed to the user.")
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;
}
ApplicationParams applicationParams = (ApplicationParams) o;
return Objects.equals(this.defaultPriority, applicationParams.defaultPriority) &&
Objects.equals(this.description, applicationParams.description) &&
Objects.equals(this.name, applicationParams.name);
}
@Override
public int hashCode() {
return Objects.hash(defaultPriority, description, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApplicationParams {\n");
sb.append(" defaultPriority: ").append(toIndentedString(defaultPriority)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).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 ");
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,27 +10,31 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* The Client holds information about a device which can receive notifications (and other stuff).
*/
@ApiModel(description = "The Client holds information about a device which can receive notifications (and other stuff).")
@Schema(description = "The Client holds information about a device which can receive notifications (and other stuff).")
public class Client {
@SerializedName("id")
private Long id = null;
@SerializedName("lastUsed")
private OffsetDateTime lastUsed = null;
@SerializedName("name")
private String name = null;
@@ -41,11 +45,20 @@ public class Client {
* The client id.
* @return id
**/
@ApiModelProperty(example = "5", required = true, value = "The client id.")
@Schema(example = "5", required = true, description = "The client id.")
public Long getId() {
return id;
}
/**
* The last time the client token was used.
* @return lastUsed
**/
@Schema(example = "2019-01-01T00:00Z", description = "The last time the client token was used.")
public OffsetDateTime getLastUsed() {
return lastUsed;
}
public Client name(String name) {
this.name = name;
return this;
@@ -55,7 +68,7 @@ public class Client {
* The client name. This is how the client should be displayed to the user.
* @return name
**/
@ApiModelProperty(example = "Android Phone", required = true, value = "The client name. This is how the client should be displayed to the user.")
@Schema(example = "Android Phone", required = true, description = "The client name. This is how the client should be displayed to the user.")
public String getName() {
return name;
}
@@ -68,7 +81,7 @@ public class Client {
* The client token. Can be used as &#x60;clientToken&#x60;. See Authentication.
* @return token
**/
@ApiModelProperty(example = "CWH0wZ5r0Mbac.r", required = true, value = "The client token. Can be used as `clientToken`. See Authentication.")
@Schema(example = "CWH0wZ5r0Mbac.r", required = true, description = "The client token. Can be used as `clientToken`. See Authentication.")
public String getToken() {
return token;
}
@@ -84,13 +97,14 @@ public class Client {
}
Client client = (Client) o;
return Objects.equals(this.id, client.id) &&
Objects.equals(this.lastUsed, client.lastUsed) &&
Objects.equals(this.name, client.name) &&
Objects.equals(this.token, client.token);
}
@Override
public int hashCode() {
return Objects.hash(id, name, token);
return Objects.hash(id, lastUsed, name, token);
}
@@ -100,6 +114,7 @@ public class Client {
sb.append("class Client {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" token: ").append(toIndentedString(token)).append("\n");
sb.append("}");
@@ -118,4 +133,3 @@ public class Client {
}
}

View File

@@ -0,0 +1,92 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.2
*
*
* 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 com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* Params allowed to create or update Clients.
*/
@Schema(description = "Params allowed to create or update Clients.")
public class ClientParams {
@SerializedName("name")
private String name = null;
public ClientParams name(String name) {
this.name = name;
return this;
}
/**
* The client name
* @return name
**/
@Schema(example = "My Client", required = true, description = "The client name")
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;
}
ClientParams clientParams = (ClientParams) o;
return Objects.equals(this.name, clientParams.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClientParams {\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 ");
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,37 +10,34 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* The UserWithPass holds information about the credentials and other stuff.
* Used for user creation.
*/
@ApiModel(description = "The UserWithPass holds information about the credentials and other stuff.")
public class UserWithPass {
@Schema(description = "Used for user creation.")
public class CreateUserExternal {
@SerializedName("admin")
private Boolean admin = null;
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
@SerializedName("pass")
private String pass = null;
public UserWithPass admin(Boolean admin) {
public CreateUserExternal admin(Boolean admin) {
this.admin = admin;
return this;
}
@@ -49,7 +46,7 @@ public class UserWithPass {
* If the user is an administrator.
* @return admin
**/
@ApiModelProperty(example = "true", value = "If the user is an administrator.")
@Schema(example = "true", required = true, description = "If the user is an administrator.")
public Boolean isAdmin() {
return admin;
}
@@ -58,16 +55,7 @@ public class UserWithPass {
this.admin = admin;
}
/**
* The user id.
* @return id
**/
@ApiModelProperty(example = "25", required = true, value = "The user id.")
public Long getId() {
return id;
}
public UserWithPass name(String name) {
public CreateUserExternal name(String name) {
this.name = name;
return this;
}
@@ -76,7 +64,7 @@ public class UserWithPass {
* The user name. For login.
* @return name
**/
@ApiModelProperty(example = "unicorn", required = true, value = "The user name. For login.")
@Schema(example = "unicorn", required = true, description = "The user name. For login.")
public String getName() {
return name;
}
@@ -85,7 +73,7 @@ public class UserWithPass {
this.name = name;
}
public UserWithPass pass(String pass) {
public CreateUserExternal pass(String pass) {
this.pass = pass;
return this;
}
@@ -94,7 +82,7 @@ public class UserWithPass {
* The user password. For login.
* @return pass
**/
@ApiModelProperty(example = "nrocinu", required = true, value = "The user password. For login.")
@Schema(example = "nrocinu", required = true, description = "The user password. For login.")
public String getPass() {
return pass;
}
@@ -112,26 +100,24 @@ public class UserWithPass {
if (o == null || getClass() != o.getClass()) {
return false;
}
UserWithPass userWithPass = (UserWithPass) o;
return Objects.equals(this.admin, userWithPass.admin) &&
Objects.equals(this.id, userWithPass.id) &&
Objects.equals(this.name, userWithPass.name) &&
Objects.equals(this.pass, userWithPass.pass);
CreateUserExternal createUserExternal = (CreateUserExternal) o;
return Objects.equals(this.admin, createUserExternal.admin) &&
Objects.equals(this.name, createUserExternal.name) &&
Objects.equals(this.pass, createUserExternal.pass);
}
@Override
public int hashCode() {
return Objects.hash(admin, id, name, pass);
return Objects.hash(admin, name, pass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserWithPass {\n");
sb.append("class CreateUserExternal {\n");
sb.append(" admin: ").append(toIndentedString(admin)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" pass: ").append(toIndentedString(pass)).append("\n");
sb.append("}");
@@ -150,4 +136,3 @@ public class UserWithPass {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* The Error contains error relevant information.
*/
@ApiModel(description = "The Error contains error relevant information.")
@Schema(description = "The Error contains error relevant information.")
public class Error {
@SerializedName("error")
private String error = null;
@@ -46,7 +46,7 @@ public class Error {
* The general error message
* @return error
**/
@ApiModelProperty(example = "Unauthorized", required = true, value = "The general error message")
@Schema(example = "Unauthorized", required = true, description = "The general error message")
public String getError() {
return error;
}
@@ -64,7 +64,7 @@ public class Error {
* The http error code.
* @return errorCode
**/
@ApiModelProperty(example = "401", required = true, value = "The http error code.")
@Schema(example = "401", required = true, description = "The http error code.")
public Long getErrorCode() {
return errorCode;
}
@@ -82,7 +82,7 @@ public class Error {
* The http error code.
* @return errorDescription
**/
@ApiModelProperty(example = "you need to provide a valid access token or user credentials to access this api", required = true, value = "The http error code.")
@Schema(example = "you need to provide a valid access token or user credentials to access this api", required = true, description = "The http error code.")
public String getErrorDescription() {
return errorDescription;
}
@@ -136,4 +136,3 @@ public class Error {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* Health represents how healthy the application is.
*/
@ApiModel(description = "Health represents how healthy the application is.")
@Schema(description = "Health represents how healthy the application is.")
public class Health {
@SerializedName("database")
private String database = null;
@@ -43,7 +43,7 @@ public class Health {
* The health of the database connection.
* @return database
**/
@ApiModelProperty(example = "green", required = true, value = "The health of the database connection.")
@Schema(example = "green", required = true, description = "The health of the database connection.")
public String getDatabase() {
return database;
}
@@ -61,7 +61,7 @@ public class Health {
* The health of the overall application.
* @return health
**/
@ApiModelProperty(example = "green", required = true, value = "The health of the overall application.")
@Schema(example = "green", required = true, description = "The health of the overall application.")
public String getHealth() {
return health;
}
@@ -113,4 +113,3 @@ public class Health {
}
}

View File

@@ -0,0 +1,93 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.2
*
*
* 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 com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.File;
import java.io.IOException;
/**
* IdImageBody
*/
public class IdImageBody {
@SerializedName("file")
private File file = null;
public IdImageBody file(File file) {
this.file = file;
return this;
}
/**
* the application image
* @return file
**/
@Schema(required = true, description = "the application image")
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IdImageBody idImageBody = (IdImageBody) o;
return Objects.equals(this.file, idImageBody.file);
}
@Override
public int hashCode() {
return Objects.hash(Objects.hashCode(file));
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IdImageBody {\n");
sb.append(" file: ").append(toIndentedString(file)).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 ");
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,27 +10,27 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.threeten.bp.OffsetDateTime;
/**
* The MessageExternal holds information about a message which was sent by an Application.
*/
@ApiModel(description = "The MessageExternal holds information about a message which was sent by an Application.")
@Schema(description = "The MessageExternal holds information about a message which was sent by an Application.")
public class Message {
@SerializedName("appid")
private Long appid = null;
@@ -57,7 +57,7 @@ public class Message {
* The application id that send this message.
* @return appid
**/
@ApiModelProperty(example = "5", required = true, value = "The application id that send this message.")
@Schema(example = "5", required = true, description = "The application id that send this message.")
public Long getAppid() {
return appid;
}
@@ -66,7 +66,7 @@ public class Message {
* The date the message was created.
* @return date
**/
@ApiModelProperty(example = "2018-02-27T19:36:10.5045044+01:00", required = true, value = "The date the message was created.")
@Schema(example = "2018-02-27T19:36:10.504504400+01:00", required = true, description = "The date the message was created.")
public OffsetDateTime getDate() {
return date;
}
@@ -88,7 +88,7 @@ public class Message {
* The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &amp;lt;top-namespace&amp;gt;::[&amp;lt;sub-namespace&amp;gt;::]&amp;lt;action&amp;gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
* @return extras
**/
@ApiModelProperty(example = "{\"home::appliances::lighting::on\":{\"brightness\":15},\"home::appliances::thermostat::change_temperature\":{\"temperature\":23}}", value = "The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.")
@Schema(example = "{\"home::appliances::lighting::on\":{\"brightness\":15},\"home::appliances::thermostat::change_temperature\":{\"temperature\":23}}", description = "The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.")
public Map<String, Object> getExtras() {
return extras;
}
@@ -101,7 +101,7 @@ public class Message {
* The message id.
* @return id
**/
@ApiModelProperty(example = "25", required = true, value = "The message id.")
@Schema(example = "25", required = true, description = "The message id.")
public Long getId() {
return id;
}
@@ -115,7 +115,7 @@ public class Message {
* The message. Markdown (excluding html) is allowed.
* @return message
**/
@ApiModelProperty(example = "**Backup** was successfully finished.", required = true, value = "The message. Markdown (excluding html) is allowed.")
@Schema(example = "**Backup** was successfully finished.", required = true, description = "The message. Markdown (excluding html) is allowed.")
public String getMessage() {
return message;
}
@@ -130,10 +130,10 @@ public class Message {
}
/**
* The priority of the message.
* The priority of the message. If unset, then the default priority of the application will be used.
* @return priority
**/
@ApiModelProperty(example = "2", value = "The priority of the message.")
@Schema(example = "2", description = "The priority of the message. If unset, then the default priority of the application will be used.")
public Long getPriority() {
return priority;
}
@@ -151,7 +151,7 @@ public class Message {
* The title of the message.
* @return title
**/
@ApiModelProperty(example = "Backup", value = "The title of the message.")
@Schema(example = "Backup", description = "The title of the message.")
public String getTitle() {
return title;
}
@@ -213,4 +213,3 @@ public class Message {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,10 +10,10 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.github.gotify.client.model.Message;
import com.github.gotify.client.model.Paging;
import com.google.gson.TypeAdapter;
@@ -21,16 +21,16 @@ import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Wrapper for the paging and the messages
* Wrapper for the paging and the messages.
*/
@ApiModel(description = "Wrapper for the paging and the messages")
@Schema(description = "Wrapper for the paging and the messages.")
public class PagedMessages {
@SerializedName("messages")
private List<Message> messages = new ArrayList<Message>();
@@ -38,29 +38,15 @@ public class PagedMessages {
@SerializedName("paging")
private Paging paging = null;
public PagedMessages messages(List<Message> messages) {
this.messages = messages;
return this;
}
public PagedMessages addMessagesItem(Message messagesItem) {
this.messages.add(messagesItem);
return this;
}
/**
* The messages.
* @return messages
**/
@ApiModelProperty(required = true, value = "The messages.")
@Schema(required = true, description = "The messages.")
public List<Message> getMessages() {
return messages;
}
public void setMessages(List<Message> messages) {
this.messages = messages;
}
public PagedMessages paging(Paging paging) {
this.paging = paging;
return this;
@@ -70,7 +56,7 @@ public class PagedMessages {
* Get paging
* @return paging
**/
@ApiModelProperty(required = true, value = "")
@Schema(required = true, description = "")
public Paging getPaging() {
return paging;
}
@@ -122,4 +108,3 @@ public class PagedMessages {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* The Paging holds information about the limit and making requests to the next page.
*/
@ApiModel(description = "The Paging holds information about the limit and making requests to the next page.")
@Schema(description = "The Paging holds information about the limit and making requests to the next page.")
public class Paging {
@SerializedName("limit")
private Long limit = null;
@@ -46,7 +46,7 @@ public class Paging {
* maximum: 200
* @return limit
**/
@ApiModelProperty(example = "123", required = true, value = "The limit of the messages for the current request.")
@Schema(example = "123", required = true, description = "The limit of the messages for the current request.")
public Long getLimit() {
return limit;
}
@@ -55,7 +55,7 @@ public class Paging {
* The request url for the next page. Empty/Null when no next page is available.
* @return next
**/
@ApiModelProperty(example = "http://example.com/message?limit=50&since=123456", value = "The request url for the next page. Empty/Null when no next page is available.")
@Schema(example = "http://example.com/message?limit=50&since=123456", description = "The request url for the next page. Empty/Null when no next page is available.")
public String getNext() {
return next;
}
@@ -65,7 +65,7 @@ public class Paging {
* minimum: 0
* @return since
**/
@ApiModelProperty(example = "5", required = true, value = "The ID of the last message returned in the current request. Use this as alternative to the next link.")
@Schema(example = "5", required = true, description = "The ID of the last message returned in the current request. Use this as alternative to the next link.")
public Long getSince() {
return since;
}
@@ -74,7 +74,7 @@ public class Paging {
* The amount of messages that got returned in the current request.
* @return size
**/
@ApiModelProperty(example = "5", required = true, value = "The amount of messages that got returned in the current request.")
@Schema(example = "5", required = true, description = "The amount of messages that got returned in the current request.")
public Long getSize() {
return size;
}
@@ -126,4 +126,3 @@ public class Paging {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,25 +10,25 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Holds information about a plugin instance for one user.
*/
@ApiModel(description = "Holds information about a plugin instance for one user.")
@Schema(description = "Holds information about a plugin instance for one user.")
public class PluginConf {
@SerializedName("author")
private String author = null;
@@ -61,7 +61,7 @@ public class PluginConf {
* The author of the plugin.
* @return author
**/
@ApiModelProperty(example = "jmattheis", value = "The author of the plugin.")
@Schema(example = "jmattheis", description = "The author of the plugin.")
public String getAuthor() {
return author;
}
@@ -80,7 +80,7 @@ public class PluginConf {
* Capabilities the plugin provides
* @return capabilities
**/
@ApiModelProperty(example = "[\"webhook\",\"display\"]", required = true, value = "Capabilities the plugin provides")
@Schema(example = "[\"webhook\",\"display\"]", required = true, description = "Capabilities the plugin provides")
public List<String> getCapabilities() {
return capabilities;
}
@@ -98,7 +98,7 @@ public class PluginConf {
* Whether the plugin instance is enabled.
* @return enabled
**/
@ApiModelProperty(example = "true", required = true, value = "Whether the plugin instance is enabled.")
@Schema(example = "true", required = true, description = "Whether the plugin instance is enabled.")
public Boolean isEnabled() {
return enabled;
}
@@ -111,7 +111,7 @@ public class PluginConf {
* The plugin id.
* @return id
**/
@ApiModelProperty(example = "25", required = true, value = "The plugin id.")
@Schema(example = "25", required = true, description = "The plugin id.")
public Long getId() {
return id;
}
@@ -120,7 +120,7 @@ public class PluginConf {
* The license of the plugin.
* @return license
**/
@ApiModelProperty(example = "MIT", value = "The license of the plugin.")
@Schema(example = "MIT", description = "The license of the plugin.")
public String getLicense() {
return license;
}
@@ -129,7 +129,7 @@ public class PluginConf {
* The module path of the plugin.
* @return modulePath
**/
@ApiModelProperty(example = "github.com/gotify/server/plugin/example/echo", required = true, value = "The module path of the plugin.")
@Schema(example = "github.com/gotify/server/plugin/example/echo", required = true, description = "The module path of the plugin.")
public String getModulePath() {
return modulePath;
}
@@ -138,7 +138,7 @@ public class PluginConf {
* The plugin name.
* @return name
**/
@ApiModelProperty(example = "RSS poller", required = true, value = "The plugin name.")
@Schema(example = "RSS poller", required = true, description = "The plugin name.")
public String getName() {
return name;
}
@@ -152,7 +152,7 @@ public class PluginConf {
* The user name. For login.
* @return token
**/
@ApiModelProperty(example = "P1234", required = true, value = "The user name. For login.")
@Schema(example = "P1234", required = true, description = "The user name. For login.")
public String getToken() {
return token;
}
@@ -165,7 +165,7 @@ public class PluginConf {
* The website of the plugin.
* @return website
**/
@ApiModelProperty(example = "gotify.net", value = "The website of the plugin.")
@Schema(example = "gotify.net", description = "The website of the plugin.")
public String getWebsite() {
return website;
}
@@ -227,4 +227,3 @@ public class PluginConf {
}
}

View File

@@ -0,0 +1,138 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.2
*
*
* 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 com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* Used for updating a user.
*/
@Schema(description = "Used for updating a user.")
public class UpdateUserExternal {
@SerializedName("admin")
private Boolean admin = null;
@SerializedName("name")
private String name = null;
@SerializedName("pass")
private String pass = null;
public UpdateUserExternal admin(Boolean admin) {
this.admin = admin;
return this;
}
/**
* If the user is an administrator.
* @return admin
**/
@Schema(example = "true", required = true, description = "If the user is an administrator.")
public Boolean isAdmin() {
return admin;
}
public void setAdmin(Boolean admin) {
this.admin = admin;
}
public UpdateUserExternal name(String name) {
this.name = name;
return this;
}
/**
* The user name. For login.
* @return name
**/
@Schema(example = "unicorn", required = true, description = "The user name. For login.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public UpdateUserExternal pass(String pass) {
this.pass = pass;
return this;
}
/**
* The user password. For login. Empty for using old password
* @return pass
**/
@Schema(example = "nrocinu", description = "The user password. For login. Empty for using old password")
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdateUserExternal updateUserExternal = (UpdateUserExternal) o;
return Objects.equals(this.admin, updateUserExternal.admin) &&
Objects.equals(this.name, updateUserExternal.name) &&
Objects.equals(this.pass, updateUserExternal.pass);
}
@Override
public int hashCode() {
return Objects.hash(admin, name, pass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdateUserExternal {\n");
sb.append(" admin: ").append(toIndentedString(admin)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" pass: ").append(toIndentedString(pass)).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 ");
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* The User holds information about permission and other stuff.
*/
@ApiModel(description = "The User holds information about permission and other stuff.")
@Schema(description = "The User holds information about permission and other stuff.")
public class User {
@SerializedName("admin")
private Boolean admin = null;
@@ -46,7 +46,7 @@ public class User {
* If the user is an administrator.
* @return admin
**/
@ApiModelProperty(example = "true", value = "If the user is an administrator.")
@Schema(example = "true", required = true, description = "If the user is an administrator.")
public Boolean isAdmin() {
return admin;
}
@@ -59,7 +59,7 @@ public class User {
* The user id.
* @return id
**/
@ApiModelProperty(example = "25", required = true, value = "The user id.")
@Schema(example = "25", required = true, description = "The user id.")
public Long getId() {
return id;
}
@@ -73,7 +73,7 @@ public class User {
* The user name. For login.
* @return name
**/
@ApiModelProperty(example = "unicorn", required = true, value = "The user name. For login.")
@Schema(example = "unicorn", required = true, description = "The user name. For login.")
public String getName() {
return name;
}
@@ -127,4 +127,3 @@ public class User {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* The Password for updating the user.
*/
@ApiModel(description = "The Password for updating the user.")
@Schema(description = "The Password for updating the user.")
public class UserPass {
@SerializedName("pass")
private String pass = null;
@@ -40,7 +40,7 @@ public class UserPass {
* The user password. For login.
* @return pass
**/
@ApiModelProperty(example = "nrocinu", required = true, value = "The user password. For login.")
@Schema(example = "nrocinu", required = true, description = "The user password. For login.")
public String getPass() {
return pass;
}
@@ -90,4 +90,3 @@ public class UserPass {
}
}

View File

@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
*
* OpenAPI spec version: 2.0.1
* OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,23 +10,23 @@
* Do not edit the class manually.
*/
package com.github.gotify.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* VersionInfo Model
*/
@ApiModel(description = "VersionInfo Model")
@Schema(description = "VersionInfo Model")
public class VersionInfo {
@SerializedName("buildDate")
private String buildDate = null;
@@ -46,7 +46,7 @@ public class VersionInfo {
* The date on which this binary was built.
* @return buildDate
**/
@ApiModelProperty(example = "2018-02-27T19:36:10.5045044+01:00", required = true, value = "The date on which this binary was built.")
@Schema(example = "2018-02-27T19:36:10.5045044+01:00", required = true, description = "The date on which this binary was built.")
public String getBuildDate() {
return buildDate;
}
@@ -64,7 +64,7 @@ public class VersionInfo {
* The git commit hash on which this binary was built.
* @return commit
**/
@ApiModelProperty(example = "ae9512b6b6feea56a110d59a3353ea3b9c293864", required = true, value = "The git commit hash on which this binary was built.")
@Schema(example = "ae9512b6b6feea56a110d59a3353ea3b9c293864", required = true, description = "The git commit hash on which this binary was built.")
public String getCommit() {
return commit;
}
@@ -82,7 +82,7 @@ public class VersionInfo {
* The current version.
* @return version
**/
@ApiModelProperty(example = "5.2.6", required = true, value = "The current version.")
@Schema(example = "5.2.6", required = true, description = "The current version.")
public String getVersion() {
return version;
}
@@ -136,4 +136,3 @@ public class VersionInfo {
}
}

View File

@@ -2,16 +2,19 @@ package com.github.gotify.client.api;
import com.github.gotify.client.ApiClient;
import com.github.gotify.client.model.Application;
import com.github.gotify.client.model.ApplicationParams;
import com.github.gotify.client.model.Error;
import java.io.File;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for ApplicationApi
*/
@@ -24,6 +27,7 @@ public class ApplicationApiTest {
api = new ApiClient().createService(ApplicationApi.class);
}
/**
* Create an application.
*
@@ -31,11 +35,12 @@ public class ApplicationApiTest {
*/
@Test
public void createAppTest() {
Application body = null;
ApplicationParams body = null;
// Application response = api.createApp(body);
// TODO: test validations
}
/**
* Delete an application.
*
@@ -48,6 +53,7 @@ public class ApplicationApiTest {
// TODO: test validations
}
/**
* Return all applications.
*
@@ -59,6 +65,20 @@ public class ApplicationApiTest {
// TODO: test validations
}
/**
* Deletes an image of an application.
*
*
*/
@Test
public void removeAppImageTest() {
Long id = null;
// Void response = api.removeAppImage(id);
// TODO: test validations
}
/**
* Update an application.
*
@@ -66,12 +86,13 @@ public class ApplicationApiTest {
*/
@Test
public void updateApplicationTest() {
Application body = null;
ApplicationParams body = null;
Long id = null;
// Application response = api.updateApplication(body, id);
// TODO: test validations
}
/**
* Upload an image for an application.
*

View File

@@ -2,15 +2,18 @@ package com.github.gotify.client.api;
import com.github.gotify.client.ApiClient;
import com.github.gotify.client.model.Client;
import com.github.gotify.client.model.ClientParams;
import com.github.gotify.client.model.Error;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for ClientApi
*/
@@ -23,6 +26,7 @@ public class ClientApiTest {
api = new ApiClient().createService(ClientApi.class);
}
/**
* Create a client.
*
@@ -30,11 +34,12 @@ public class ClientApiTest {
*/
@Test
public void createClientTest() {
Client body = null;
ClientParams body = null;
// Client response = api.createClient(body);
// TODO: test validations
}
/**
* Delete a client.
*
@@ -47,6 +52,7 @@ public class ClientApiTest {
// TODO: test validations
}
/**
* Return all clients.
*
@@ -58,6 +64,7 @@ public class ClientApiTest {
// TODO: test validations
}
/**
* Update a client.
*
@@ -65,7 +72,7 @@ public class ClientApiTest {
*/
@Test
public void updateClientTest() {
Client body = null;
ClientParams body = null;
Long id = null;
// Client response = api.updateClient(body, id);

View File

@@ -5,11 +5,13 @@ import com.github.gotify.client.model.Health;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for HealthApi
*/
@@ -22,6 +24,7 @@ public class HealthApiTest {
api = new ApiClient().createService(HealthApi.class);
}
/**
* Get health information.
*

View File

@@ -7,11 +7,13 @@ import com.github.gotify.client.model.PagedMessages;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for MessageApi
*/
@@ -24,6 +26,7 @@ public class MessageApiTest {
api = new ApiClient().createService(MessageApi.class);
}
/**
* Create a message.
*
@@ -36,6 +39,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Delete all messages from a specific application.
*
@@ -48,6 +52,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Deletes a message with an id.
*
@@ -60,6 +65,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Delete all messages.
*
@@ -71,6 +77,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Return all messages from a specific application.
*
@@ -85,6 +92,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Return all messages.
*
@@ -98,6 +106,7 @@ public class MessageApiTest {
// TODO: test validations
}
/**
* Websocket, return newly created messages.
*

View File

@@ -6,11 +6,13 @@ import com.github.gotify.client.model.PluginConf;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for PluginApi
*/
@@ -23,6 +25,7 @@ public class PluginApiTest {
api = new ApiClient().createService(PluginApi.class);
}
/**
* Disable a plugin.
*
@@ -35,6 +38,7 @@ public class PluginApiTest {
// TODO: test validations
}
/**
* Enable a plugin.
*
@@ -47,6 +51,7 @@ public class PluginApiTest {
// TODO: test validations
}
/**
* Get YAML configuration for Configurer plugin.
*
@@ -59,6 +64,7 @@ public class PluginApiTest {
// TODO: test validations
}
/**
* Get display info for a Displayer plugin.
*
@@ -71,6 +77,7 @@ public class PluginApiTest {
// TODO: test validations
}
/**
* Return all plugins.
*
@@ -82,6 +89,7 @@ public class PluginApiTest {
// TODO: test validations
}
/**
* Update YAML configuration for Configurer plugin.
*

View File

@@ -1,18 +1,21 @@
package com.github.gotify.client.api;
import com.github.gotify.client.ApiClient;
import com.github.gotify.client.model.CreateUserExternal;
import com.github.gotify.client.model.Error;
import com.github.gotify.client.model.UpdateUserExternal;
import com.github.gotify.client.model.User;
import com.github.gotify.client.model.UserPass;
import com.github.gotify.client.model.UserWithPass;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for UserApi
*/
@@ -25,18 +28,20 @@ public class UserApiTest {
api = new ApiClient().createService(UserApi.class);
}
/**
* Create a user.
*
*
* With enabled registration: non admin users can be created without authentication. With disabled registrations: users can only be created by admin users.
*/
@Test
public void createUserTest() {
UserWithPass body = null;
CreateUserExternal body = null;
// User response = api.createUser(body);
// TODO: test validations
}
/**
* Return the current user.
*
@@ -48,6 +53,7 @@ public class UserApiTest {
// TODO: test validations
}
/**
* Deletes a user.
*
@@ -60,6 +66,7 @@ public class UserApiTest {
// TODO: test validations
}
/**
* Get a user.
*
@@ -72,6 +79,7 @@ public class UserApiTest {
// TODO: test validations
}
/**
* Return all users.
*
@@ -83,6 +91,7 @@ public class UserApiTest {
// TODO: test validations
}
/**
* Update the password of the current user.
*
@@ -95,6 +104,7 @@ public class UserApiTest {
// TODO: test validations
}
/**
* Update a user.
*
@@ -102,9 +112,9 @@ public class UserApiTest {
*/
@Test
public void updateUserTest() {
UpdateUserExternal body = null;
Long id = null;
UserWithPass body = null;
// User response = api.updateUser(id, body);
// User response = api.updateUser(body, id);
// TODO: test validations
}

View File

@@ -5,11 +5,13 @@ import com.github.gotify.client.model.VersionInfo;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for VersionApi
*/
@@ -22,6 +24,7 @@ public class VersionApiTest {
api = new ApiClient().createService(VersionApi.class);
}
/**
* Get version information.
*