diff options
Diffstat (limited to 'rust/fatcat-api')
-rw-r--r-- | rust/fatcat-api/README.md | 2 | ||||
-rw-r--r-- | rust/fatcat-api/api.yaml | 8 | ||||
-rw-r--r-- | rust/fatcat-api/api/swagger.yaml | 31 | ||||
-rw-r--r-- | rust/fatcat-api/src/models.rs | 20 |
4 files changed, 51 insertions, 10 deletions
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md index 364f7271..146758fb 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-26T01:47:28.955Z +- Build date: 2018-05-26T02:33:00.709Z 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 cfce24d7..146c11dd 100644 --- a/rust/fatcat-api/api.yaml +++ b/rust/fatcat-api/api.yaml @@ -50,6 +50,10 @@ x-entity-edit-props: &ENTITYEDITPROPS type: integer example: 42 format: int64 + redirect_ident: + type: string + example: "f1f046a3-45c9-4b99-adce-000000000002" + #format: uuid editgroup_id: type: integer example: 16 @@ -174,6 +178,10 @@ definitions: type: string entity_edit: type: object + required: + - edit_id + - ident + - editgroup_id properties: <<: *ENTITYEDITPROPS editor: diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml index 506cb9db..db7b0e03 100644 --- a/rust/fatcat-api/api/swagger.yaml +++ b/rust/fatcat-api/api/swagger.yaml @@ -1300,6 +1300,10 @@ definitions: upperCaseName: "WORK_ENTITY" entity_edit: type: "object" + required: + - "edit_id" + - "editgroup_id" + - "ident" properties: extra: type: "object" @@ -1307,6 +1311,9 @@ definitions: type: "integer" format: "int64" example: 16 + redirect_ident: + type: "string" + example: "f1f046a3-45c9-4b99-adce-000000000002" revision: type: "integer" format: "int64" @@ -1322,6 +1329,7 @@ definitions: ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 upperCaseName: "ENTITY_EDIT" @@ -1360,55 +1368,65 @@ definitions: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 creators: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 files: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 containers: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 releases: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 description: "description" @@ -1480,55 +1498,65 @@ definitions: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 creators: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 files: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 containers: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 releases: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 upperCaseName: "EDITGROUP_EDITS" @@ -1585,6 +1613,9 @@ x-entity-edit-props: type: "integer" example: 42 format: "int64" + redirect_ident: + type: "string" + example: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: type: "integer" example: 16 diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index e3ce33c3..68242058 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -285,30 +285,32 @@ pub struct EntityEdit { pub extra: Option<serde_json::Value>, #[serde(rename = "editgroup_id")] + pub editgroup_id: i64, + + #[serde(rename = "redirect_ident")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<i64>, + pub redirect_ident: Option<String>, #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] pub revision: Option<i64>, #[serde(rename = "ident")] - #[serde(skip_serializing_if = "Option::is_none")] - pub ident: Option<String>, + pub ident: String, #[serde(rename = "edit_id")] - #[serde(skip_serializing_if = "Option::is_none")] - pub edit_id: Option<i64>, + pub edit_id: i64, } impl EntityEdit { - pub fn new() -> EntityEdit { + pub fn new(editgroup_id: i64, ident: String, edit_id: i64) -> EntityEdit { EntityEdit { extra: None, - editgroup_id: None, + editgroup_id: editgroup_id, + redirect_ident: None, revision: None, - ident: None, - edit_id: None, + ident: ident, + edit_id: edit_id, } } } |