summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-api')
-rw-r--r--rust/fatcat-api/README.md2
-rw-r--r--rust/fatcat-api/api.yaml30
-rw-r--r--rust/fatcat-api/api/swagger.yaml222
-rw-r--r--rust/fatcat-api/src/client.rs106
-rw-r--r--rust/fatcat-api/src/lib.rs106
-rw-r--r--rust/fatcat-api/src/models.rs8
6 files changed, 237 insertions, 237 deletions
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md
index deb2c8a5..25d89337 100644
--- a/rust/fatcat-api/README.md
+++ b/rust/fatcat-api/README.md
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
- API version: 0.1.0
-- Build date: 2018-05-16T05:18:32.538Z
+- Build date: 2018-05-16T05:34:17.733Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api/api.yaml
index 195f23fe..01e0b60c 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -41,7 +41,7 @@ x-entity-edit-props: &ENTITYEDITPROPS
definitions:
- error:
+ error_response:
type: object
required:
- message
@@ -162,15 +162,15 @@ x-entity-responses: &ENTITYRESPONSES
400:
description: Bad Request
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
404:
description: Not Found
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
paths:
/creator:
@@ -375,11 +375,11 @@ paths:
404:
description: Not Found
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
/editor/{username}/changelog:
parameters:
- name: username
@@ -395,11 +395,11 @@ paths:
404:
description: Not Found
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
/editgroup:
post:
responses:
@@ -410,11 +410,11 @@ paths:
400:
description: Bad Request
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
/editgroup/{id}:
parameters:
- name: id
@@ -430,11 +430,11 @@ paths:
404:
description: Not Found
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
/editgroup/{id}/accept:
parameters:
- name: id
@@ -450,12 +450,12 @@ paths:
400:
description: Unmergable
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
404:
description: Not Found
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: Generic Error
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml
index 8d8308fc..3d3c2591 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api/api/swagger.yaml
@@ -42,29 +42,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CREATOR_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CREATOR_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CREATOR_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "creator_post"
uppercase_operation_id: "CREATOR_POST"
@@ -94,29 +94,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CREATOR_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CREATOR_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CREATOR_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "creator_id_get"
uppercase_operation_id: "CREATOR_ID_GET"
@@ -145,29 +145,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CREATOR_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CREATOR_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CREATOR_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "creator_lookup_get"
uppercase_operation_id: "CREATOR_LOOKUP_GET"
@@ -202,29 +202,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CONTAINER_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CONTAINER_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CONTAINER_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "container_post"
uppercase_operation_id: "CONTAINER_POST"
@@ -254,29 +254,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CONTAINER_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CONTAINER_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CONTAINER_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "container_id_get"
uppercase_operation_id: "CONTAINER_ID_GET"
@@ -305,29 +305,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "CONTAINER_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "CONTAINER_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "CONTAINER_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "container_lookup_get"
uppercase_operation_id: "CONTAINER_LOOKUP_GET"
@@ -362,29 +362,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "FILE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "FILE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "FILE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "file_post"
uppercase_operation_id: "FILE_POST"
@@ -414,29 +414,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "FILE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "FILE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "FILE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "file_id_get"
uppercase_operation_id: "FILE_ID_GET"
@@ -465,29 +465,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "FILE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "FILE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "FILE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "file_lookup_get"
uppercase_operation_id: "FILE_LOOKUP_GET"
@@ -522,29 +522,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "RELEASE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "RELEASE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "RELEASE_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "release_post"
uppercase_operation_id: "RELEASE_POST"
@@ -574,29 +574,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "RELEASE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "RELEASE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "RELEASE_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "release_id_get"
uppercase_operation_id: "RELEASE_ID_GET"
@@ -625,29 +625,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "RELEASE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "RELEASE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "RELEASE_LOOKUP_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "release_lookup_get"
uppercase_operation_id: "RELEASE_LOOKUP_GET"
@@ -682,29 +682,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "WORK_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "WORK_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "WORK_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "work_post"
uppercase_operation_id: "WORK_POST"
@@ -734,29 +734,29 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "WORK_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "WORK_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "WORK_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "work_id_get"
uppercase_operation_id: "WORK_ID_GET"
@@ -785,20 +785,20 @@ paths:
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "EDITOR_USERNAME_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "EDITOR_USERNAME_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "editor_username_get"
uppercase_operation_id: "EDITOR_USERNAME_GET"
@@ -827,20 +827,20 @@ paths:
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "EDITOR_USERNAME_CHANGELOG_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "EDITOR_USERNAME_CHANGELOG_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "editor_username_changelog_get"
uppercase_operation_id: "EDITOR_USERNAME_CHANGELOG_GET"
@@ -863,20 +863,20 @@ paths:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
uppercase_operation_id: "EDITGROUP_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "EDITGROUP_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "editgroup_post"
uppercase_operation_id: "EDITGROUP_POST"
@@ -905,20 +905,20 @@ paths:
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "EDITGROUP_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "EDITGROUP_ID_GET"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "editgroup_id_get"
uppercase_operation_id: "EDITGROUP_ID_GET"
@@ -947,29 +947,29 @@ paths:
400:
description: "Unmergable"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "Unmergable"
x-uppercaseResponseId: "UNMERGABLE"
uppercase_operation_id: "EDITGROUP_ID_ACCEPT_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "EDITGROUP_ID_ACCEPT_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
uppercase_operation_id: "EDITGROUP_ID_ACCEPT_POST"
- uppercase_data_type: "ERROR"
+ uppercase_data_type: "ERRORRESPONSE"
producesJson: true
operation_id: "editgroup_id_accept_post"
uppercase_operation_id: "EDITGROUP_ID_ACCEPT_POST"
@@ -977,14 +977,14 @@ paths:
HttpMethod: "Post"
httpmethod: "post"
definitions:
- error:
+ error_response:
type: "object"
required:
- "message"
properties:
message:
type: "string"
- upperCaseName: "ERROR"
+ upperCaseName: "ERROR_RESPONSE"
success:
type: "object"
required:
@@ -1265,12 +1265,12 @@ x-entity-responses:
400:
description: "Bad Request"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
404:
description: "Not Found"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
default:
description: "Generic Error"
schema:
- $ref: "#/definitions/error"
+ $ref: "#/definitions/error_response"
diff --git a/rust/fatcat-api/src/client.rs b/rust/fatcat-api/src/client.rs
index f4b9e671..09b43e4b 100644
--- a/rust/fatcat-api/src/client.rs
+++ b/rust/fatcat-api/src/client.rs
@@ -185,21 +185,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerIdGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerIdGetResponse::GenericError(body))
}
@@ -248,21 +248,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerLookupGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerLookupGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerLookupGetResponse::GenericError(body))
}
@@ -313,21 +313,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerPostResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerPostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ContainerPostResponse::GenericError(body))
}
@@ -373,21 +373,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorIdGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorIdGetResponse::GenericError(body))
}
@@ -436,21 +436,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorLookupGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorLookupGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorLookupGetResponse::GenericError(body))
}
@@ -501,21 +501,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorPostResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorPostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(CreatorPostResponse::GenericError(body))
}
@@ -561,21 +561,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupIdAcceptPostResponse::Unmergable(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupIdAcceptPostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupIdAcceptPostResponse::GenericError(body))
}
@@ -621,14 +621,14 @@ impl Api for Client {
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupIdGetResponse::GenericError(body))
}
@@ -674,14 +674,14 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupPostResponse::BadRequest(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditgroupPostResponse::GenericError(body))
}
@@ -731,14 +731,14 @@ impl Api for Client {
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditorUsernameChangelogGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditorUsernameChangelogGetResponse::GenericError(body))
}
@@ -788,14 +788,14 @@ impl Api for Client {
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditorUsernameGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(EditorUsernameGetResponse::GenericError(body))
}
@@ -841,21 +841,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileIdGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileIdGetResponse::GenericError(body))
}
@@ -904,21 +904,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileLookupGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileLookupGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FileLookupGetResponse::GenericError(body))
}
@@ -969,21 +969,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FilePostResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FilePostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(FilePostResponse::GenericError(body))
}
@@ -1029,21 +1029,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseIdGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseIdGetResponse::GenericError(body))
}
@@ -1092,21 +1092,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseLookupGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseLookupGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleaseLookupGetResponse::GenericError(body))
}
@@ -1157,21 +1157,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleasePostResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleasePostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(ReleasePostResponse::GenericError(body))
}
@@ -1217,21 +1217,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkIdGetResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkIdGetResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkIdGetResponse::GenericError(body))
}
@@ -1282,21 +1282,21 @@ impl Api for Client {
400 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkPostResponse::BadRequest(body))
}
404 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkPostResponse::NotFound(body))
}
0 => {
let mut buf = String::new();
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Error>(&buf)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
Ok(WorkPostResponse::GenericError(body))
}
diff --git a/rust/fatcat-api/src/lib.rs b/rust/fatcat-api/src/lib.rs
index 17dd6c76..3696a1e2 100644
--- a/rust/fatcat-api/src/lib.rs
+++ b/rust/fatcat-api/src/lib.rs
@@ -37,11 +37,11 @@ pub enum ContainerIdGetResponse {
/// Found Entity
FoundEntity(models::ContainerEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -49,11 +49,11 @@ pub enum ContainerLookupGetResponse {
/// Found Entity
FoundEntity(models::ContainerEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -61,11 +61,11 @@ pub enum ContainerPostResponse {
/// Created Entity
CreatedEntity(models::EntityEdit),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -73,11 +73,11 @@ pub enum CreatorIdGetResponse {
/// Found Entity
FoundEntity(models::CreatorEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -85,11 +85,11 @@ pub enum CreatorLookupGetResponse {
/// Found Entity
FoundEntity(models::CreatorEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -97,11 +97,11 @@ pub enum CreatorPostResponse {
/// Created Entity
CreatedEntity(models::EntityEdit),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -109,11 +109,11 @@ pub enum EditgroupIdAcceptPostResponse {
/// Merged Successfully
MergedSuccessfully(models::Success),
/// Unmergable
- Unmergable(models::Error),
+ Unmergable(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -121,9 +121,9 @@ pub enum EditgroupIdGetResponse {
/// Found Editgroup
FoundEditgroup(models::Editgroup),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -131,9 +131,9 @@ pub enum EditgroupPostResponse {
/// Successfully Created
SuccessfullyCreated(models::Editgroup),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -141,9 +141,9 @@ pub enum EditorUsernameChangelogGetResponse {
/// Found Merged Changes
FoundMergedChanges(models::Changelogentry),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -151,9 +151,9 @@ pub enum EditorUsernameGetResponse {
/// Found Editor
FoundEditor(models::Editor),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -161,11 +161,11 @@ pub enum FileIdGetResponse {
/// Found Entity
FoundEntity(models::FileEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -173,11 +173,11 @@ pub enum FileLookupGetResponse {
/// Found Entity
FoundEntity(models::FileEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -185,11 +185,11 @@ pub enum FilePostResponse {
/// Created Entity
CreatedEntity(models::EntityEdit),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -197,11 +197,11 @@ pub enum ReleaseIdGetResponse {
/// Found Entity
FoundEntity(models::ReleaseEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -209,11 +209,11 @@ pub enum ReleaseLookupGetResponse {
/// Found Entity
FoundEntity(models::ReleaseEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -221,11 +221,11 @@ pub enum ReleasePostResponse {
/// Created Entity
CreatedEntity(models::EntityEdit),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -233,11 +233,11 @@ pub enum WorkIdGetResponse {
/// Found Entity
FoundEntity(models::WorkEntity),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
#[derive(Debug, PartialEq)]
@@ -245,11 +245,11 @@ pub enum WorkPostResponse {
/// Created Entity
CreatedEntity(models::EntityEdit),
/// Bad Request
- BadRequest(models::Error),
+ BadRequest(models::ErrorResponse),
/// Not Found
- NotFound(models::Error),
+ NotFound(models::ErrorResponse),
/// Generic Error
- GenericError(models::Error),
+ GenericError(models::ErrorResponse),
}
/// API
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index b6f450aa..2b187eaf 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -191,14 +191,14 @@ impl EntityEdit {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
-pub struct Error {
+pub struct ErrorResponse {
#[serde(rename = "message")]
pub message: String,
}
-impl Error {
- pub fn new(message: String) -> Error {
- Error { message: message }
+impl ErrorResponse {
+ pub fn new(message: String) -> ErrorResponse {
+ ErrorResponse { message: message }
}
}