aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/src/mimetypes.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-15 00:33:33 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-15 00:33:36 -0700
commit33a4cce0b97832f5f0301b318a0a50073ce6b615 (patch)
tree1b6ba7ec5944d2be2d746510e743a7934f453cd0 /rust/fatcat-api/src/mimetypes.rs
parent4a1d8f20ab91fda0f4794131144915d0c5214268 (diff)
downloadfatcat-33a4cce0b97832f5f0301b318a0a50073ce6b615.tar.gz
fatcat-33a4cce0b97832f5f0301b318a0a50073ce6b615.zip
revert to v2.3.1 codegen
This reverts back to something compatible with Iron and simple (blocking) parallelism, instead of the new async hyper 0.11 stuff.
Diffstat (limited to 'rust/fatcat-api/src/mimetypes.rs')
-rw-r--r--rust/fatcat-api/src/mimetypes.rs176
1 files changed, 72 insertions, 104 deletions
diff --git a/rust/fatcat-api/src/mimetypes.rs b/rust/fatcat-api/src/mimetypes.rs
index dfbff890..c0b83a05 100644
--- a/rust/fatcat-api/src/mimetypes.rs
+++ b/rust/fatcat-api/src/mimetypes.rs
@@ -6,308 +6,276 @@ pub mod responses {
// The macro is called per-operation to beat the recursion limit
/// Create Mime objects for the response content types for ContainerIdGet
lazy_static! {
- pub static ref CONTAINER_ID_GET_FETCH_A_SINGLE_CONTAINER_BY_ID: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_ID_GET_FETCH_A_SINGLE_CONTAINER_BY_ID: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerIdGet
lazy_static! {
- pub static ref CONTAINER_ID_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CONTAINER_ID_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerIdGet
lazy_static! {
- pub static ref CONTAINER_ID_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerLookupGet
lazy_static! {
- pub static ref CONTAINER_LOOKUP_GET_FIND_A_SINGLE_CONTAINER_BY_EXTERNAL_IDENTIFER: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_LOOKUP_GET_FIND_A_SINGLE_CONTAINER_BY_EXTERNAL_IDENTIFER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerLookupGet
lazy_static! {
- pub static ref CONTAINER_LOOKUP_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CONTAINER_LOOKUP_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerLookupGet
lazy_static! {
- pub static ref CONTAINER_LOOKUP_GET_NO_SUCH_CONTAINER: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_LOOKUP_GET_NO_SUCH_CONTAINER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerLookupGet
lazy_static! {
- pub static ref CONTAINER_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerPost
lazy_static! {
- pub static ref CONTAINER_POST_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref CONTAINER_POST_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerPost
lazy_static! {
- pub static ref CONTAINER_POST_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CONTAINER_POST_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ContainerPost
lazy_static! {
- pub static ref CONTAINER_POST_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref CONTAINER_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorIdGet
lazy_static! {
- pub static ref CREATOR_ID_GET_FETCH_A_SINGLE_CREATOR_BY_ID: Mime =
- "application/json".parse().unwrap();
+ pub static ref CREATOR_ID_GET_FETCH_A_SINGLE_CREATOR_BY_ID: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorIdGet
lazy_static! {
- pub static ref CREATOR_ID_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_ID_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorIdGet
lazy_static! {
- pub static ref CREATOR_ID_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref CREATOR_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorLookupGet
lazy_static! {
- pub static ref CREATOR_LOOKUP_GET_FIND_A_SINGLE_CREATOR_BY_EXTERNAL_IDENTIFER: Mime =
- "application/json".parse().unwrap();
+ pub static ref CREATOR_LOOKUP_GET_FIND_A_SINGLE_CREATOR_BY_EXTERNAL_IDENTIFER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorLookupGet
lazy_static! {
- pub static ref CREATOR_LOOKUP_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_LOOKUP_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorLookupGet
lazy_static! {
- pub static ref CREATOR_LOOKUP_GET_NO_SUCH_CREATOR: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_LOOKUP_GET_NO_SUCH_CREATOR: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorLookupGet
lazy_static! {
- pub static ref CREATOR_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref CREATOR_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorPost
lazy_static! {
- pub static ref CREATOR_POST_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_POST_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorPost
lazy_static! {
- pub static ref CREATOR_POST_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_POST_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for CreatorPost
lazy_static! {
- pub static ref CREATOR_POST_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdAcceptPost
lazy_static! {
- pub static ref EDITGROUP_ID_ACCEPT_POST_MERGED_EDITGROUP_SUCCESSFULLY_: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_ACCEPT_POST_MERGED_EDITGROUP_SUCCESSFULLY_: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdAcceptPost
lazy_static! {
- pub static ref EDITGROUP_ID_ACCEPT_POST_EDITGROUP_IS_IN_AN_UNMERGABLE_STATE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_ACCEPT_POST_EDITGROUP_IS_IN_AN_UNMERGABLE_STATE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdAcceptPost
lazy_static! {
- pub static ref EDITGROUP_ID_ACCEPT_POST_NO_SUCH_EDITGROUP: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_ACCEPT_POST_NO_SUCH_EDITGROUP: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdAcceptPost
lazy_static! {
- pub static ref EDITGROUP_ID_ACCEPT_POST_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_ACCEPT_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdGet
lazy_static! {
- pub static ref EDITGROUP_ID_GET_FETCH_EDITGROUP_BY_IDENTIFIER: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_GET_FETCH_EDITGROUP_BY_IDENTIFIER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdGet
lazy_static! {
- pub static ref EDITGROUP_ID_GET_NO_SUCH_EDITGROUP: Mime = "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_GET_NO_SUCH_EDITGROUP: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupIdGet
lazy_static! {
- pub static ref EDITGROUP_ID_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupPost
lazy_static! {
- pub static ref EDITGROUP_POST_SUCCESSFULLY_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref EDITGROUP_POST_SUCCESSFULLY_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupPost
lazy_static! {
- pub static ref EDITGROUP_POST_INVALID_REQUEST_PARAMETERS: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_POST_INVALID_REQUEST_PARAMETERS: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditgroupPost
lazy_static! {
- pub static ref EDITGROUP_POST_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITGROUP_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameChangelogGet
lazy_static! {
- pub static ref EDITOR_USERNAME_CHANGELOG_GET_FIND_CHANGES_: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_CHANGELOG_GET_FIND_CHANGES_: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameChangelogGet
lazy_static! {
- pub static ref EDITOR_USERNAME_CHANGELOG_GET_USERNAME_NOT_FOUND: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_CHANGELOG_GET_USERNAME_NOT_FOUND: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameChangelogGet
lazy_static! {
- pub static ref EDITOR_USERNAME_CHANGELOG_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_CHANGELOG_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameGet
lazy_static! {
- pub static ref EDITOR_USERNAME_GET_FETCH_GENERIC_INFORMATION_ABOUT_AN_EDITOR: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_GET_FETCH_GENERIC_INFORMATION_ABOUT_AN_EDITOR: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameGet
lazy_static! {
- pub static ref EDITOR_USERNAME_GET_USERNAME_NOT_FOUND: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_GET_USERNAME_NOT_FOUND: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for EditorUsernameGet
lazy_static! {
- pub static ref EDITOR_USERNAME_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref EDITOR_USERNAME_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileIdGet
lazy_static! {
- pub static ref FILE_ID_GET_FETCH_A_SINGLE_FILE_BY_ID: Mime =
- "application/json".parse().unwrap();
+ pub static ref FILE_ID_GET_FETCH_A_SINGLE_FILE_BY_ID: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileIdGet
lazy_static! {
- pub static ref FILE_ID_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_ID_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileIdGet
lazy_static! {
- pub static ref FILE_ID_GET_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileLookupGet
lazy_static! {
- pub static ref FILE_LOOKUP_GET_FIND_A_SINGLE_FILE_BY_EXTERNAL_IDENTIFER: Mime =
- "application/json".parse().unwrap();
+ pub static ref FILE_LOOKUP_GET_FIND_A_SINGLE_FILE_BY_EXTERNAL_IDENTIFER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileLookupGet
lazy_static! {
- pub static ref FILE_LOOKUP_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_LOOKUP_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileLookupGet
lazy_static! {
- pub static ref FILE_LOOKUP_GET_NO_SUCH_FILE: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_LOOKUP_GET_NO_SUCH_FILE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FileLookupGet
lazy_static! {
- pub static ref FILE_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref FILE_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FilePost
lazy_static! {
- pub static ref FILE_POST_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_POST_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FilePost
lazy_static! {
- pub static ref FILE_POST_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_POST_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for FilePost
lazy_static! {
- pub static ref FILE_POST_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseIdGet
lazy_static! {
- pub static ref RELEASE_ID_GET_FETCH_A_SINGLE_RELEASE_BY_ID: Mime =
- "application/json".parse().unwrap();
+ pub static ref RELEASE_ID_GET_FETCH_A_SINGLE_RELEASE_BY_ID: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseIdGet
lazy_static! {
- pub static ref RELEASE_ID_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_ID_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseIdGet
lazy_static! {
- pub static ref RELEASE_ID_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref RELEASE_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseLookupGet
lazy_static! {
- pub static ref RELEASE_LOOKUP_GET_FIND_A_SINGLE_RELEASE_BY_EXTERNAL_IDENTIFER: Mime =
- "application/json".parse().unwrap();
+ pub static ref RELEASE_LOOKUP_GET_FIND_A_SINGLE_RELEASE_BY_EXTERNAL_IDENTIFER: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseLookupGet
lazy_static! {
- pub static ref RELEASE_LOOKUP_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_LOOKUP_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseLookupGet
lazy_static! {
- pub static ref RELEASE_LOOKUP_GET_NO_SUCH_RELEASE: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_LOOKUP_GET_NO_SUCH_RELEASE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleaseLookupGet
lazy_static! {
- pub static ref RELEASE_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime =
- "application/json".parse().unwrap();
+ pub static ref RELEASE_LOOKUP_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleasePost
lazy_static! {
- pub static ref RELEASE_POST_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_POST_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleasePost
lazy_static! {
- pub static ref RELEASE_POST_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_POST_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for ReleasePost
lazy_static! {
- pub static ref RELEASE_POST_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkIdGet
lazy_static! {
- pub static ref WORK_ID_GET_FETCH_A_SINGLE_WORK_BY_ID: Mime =
- "application/json".parse().unwrap();
+ pub static ref WORK_ID_GET_FETCH_A_SINGLE_WORK_BY_ID: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkIdGet
lazy_static! {
- pub static ref WORK_ID_GET_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_ID_GET_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkIdGet
lazy_static! {
- pub static ref WORK_ID_GET_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_ID_GET_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkPost
lazy_static! {
- pub static ref WORK_POST_CREATED: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_POST_CREATED: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkPost
lazy_static! {
- pub static ref WORK_POST_BAD_REQUEST: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_POST_BAD_REQUEST: Mime = mime!(Application/Json);
}
/// Create Mime objects for the response content types for WorkPost
lazy_static! {
- pub static ref WORK_POST_GENERIC_ERROR_RESPONSE: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_POST_GENERIC_ERROR_RESPONSE: Mime = mime!(Application/Json);
}
}
pub mod requests {
use hyper::mime::*;
- /// Create Mime objects for the request content types for ContainerPost
+ /// Create Mime objects for the request content types for ContainerPost
lazy_static! {
- pub static ref CONTAINER_POST: Mime = "application/json".parse().unwrap();
+ pub static ref CONTAINER_POST: Mime = mime!(Application/Json);
}
- /// Create Mime objects for the request content types for CreatorPost
+ /// Create Mime objects for the request content types for CreatorPost
lazy_static! {
- pub static ref CREATOR_POST: Mime = "application/json".parse().unwrap();
+ pub static ref CREATOR_POST: Mime = mime!(Application/Json);
}
- /// Create Mime objects for the request content types for FilePost
+ /// Create Mime objects for the request content types for FilePost
lazy_static! {
- pub static ref FILE_POST: Mime = "application/json".parse().unwrap();
+ pub static ref FILE_POST: Mime = mime!(Application/Json);
}
- /// Create Mime objects for the request content types for ReleasePost
+ /// Create Mime objects for the request content types for ReleasePost
lazy_static! {
- pub static ref RELEASE_POST: Mime = "application/json".parse().unwrap();
+ pub static ref RELEASE_POST: Mime = mime!(Application/Json);
}
- /// Create Mime objects for the request content types for WorkPost
+ /// Create Mime objects for the request content types for WorkPost
lazy_static! {
- pub static ref WORK_POST: Mime = "application/json".parse().unwrap();
+ pub static ref WORK_POST: Mime = mime!(Application/Json);
}
}