summary: "Add new file to the pack",
operationId: "PleromaAPI.EmojiPackController.add_file",
summary: "Add new file to the pack",
operationId: "PleromaAPI.EmojiPackController.add_file",
requestBody: request_body("Parameters", create_request(), required: true),
parameters: [name_param()],
responses: %{
requestBody: request_body("Parameters", create_request(), required: true),
parameters: [name_param()],
responses: %{
422 => Operation.response("Unprocessable Entity", "application/json", ApiError),
404 => Operation.response("Not Found", "application/json", ApiError),
400 => Operation.response("Bad Request", "application/json", ApiError),
422 => Operation.response("Unprocessable Entity", "application/json", ApiError),
404 => Operation.response("Not Found", "application/json", ApiError),
400 => Operation.response("Bad Request", "application/json", ApiError),
- 409 => Operation.response("Conflict", "application/json", ApiError)
+ 409 => Operation.response("Conflict", "application/json", ApiError),
+ 500 => Operation.response("Error", "application/json", ApiError)
summary: "Add new file to the pack",
operationId: "PleromaAPI.EmojiPackController.update_file",
summary: "Add new file to the pack",
operationId: "PleromaAPI.EmojiPackController.update_file",
requestBody: request_body("Parameters", update_request(), required: true),
parameters: [name_param()],
responses: %{
200 => Operation.response("Files Object", "application/json", files_object()),
404 => Operation.response("Not Found", "application/json", ApiError),
400 => Operation.response("Bad Request", "application/json", ApiError),
requestBody: request_body("Parameters", update_request(), required: true),
parameters: [name_param()],
responses: %{
200 => Operation.response("Files Object", "application/json", files_object()),
404 => Operation.response("Not Found", "application/json", ApiError),
400 => Operation.response("Bad Request", "application/json", ApiError),
- 409 => Operation.response("Conflict", "application/json", ApiError)
+ 409 => Operation.response("Conflict", "application/json", ApiError),
+ 422 => Operation.response("Unprocessable Entity", "application/json", ApiError)
summary: "Delete emoji file from pack",
operationId: "PleromaAPI.EmojiPackController.delete_file",
summary: "Delete emoji file from pack",
operationId: "PleromaAPI.EmojiPackController.delete_file",
parameters: [
name_param(),
Operation.parameter(:shortcode, :query, :string, "File shortcode",
parameters: [
name_param(),
Operation.parameter(:shortcode, :query, :string, "File shortcode",
responses: %{
200 => Operation.response("Files Object", "application/json", files_object()),
400 => Operation.response("Bad Request", "application/json", ApiError),
responses: %{
200 => Operation.response("Files Object", "application/json", files_object()),
400 => Operation.response("Bad Request", "application/json", ApiError),
- 404 => Operation.response("Not Found", "application/json", ApiError)
+ 404 => Operation.response("Not Found", "application/json", ApiError),
+ 422 => Operation.response("Unprocessable Entity", "application/json", ApiError)
- Operation.parameter(:name, :path, :string, "Pack Name", example: "cofe", required: true)
+ Operation.parameter(:name, :query, :string, "Pack Name", example: "cofe", required: true)