aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-24 13:23:13 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-24 13:23:13 -0800
commit206acf1b37a1a34d5338c744e17ef2035cd2db58 (patch)
tree82a5407182d42ba44bf0821f96b403d37f111efe /rust
parente2b4675c34a6de76196255dc21389e225e54f22b (diff)
downloadfatcat-206acf1b37a1a34d5338c744e17ef2035cd2db58.tar.gz
fatcat-206acf1b37a1a34d5338c744e17ef2035cd2db58.zip
codegen schema tweaks
Diffstat (limited to 'rust')
-rw-r--r--rust/fatcat-api-spec/README.md2
-rw-r--r--rust/fatcat-api-spec/api.yaml24
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml46
-rw-r--r--rust/fatcat-api-spec/src/models.rs1
4 files changed, 53 insertions, 20 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md
index cacded6a..9d06dd4a 100644
--- a/rust/fatcat-api-spec/README.md
+++ b/rust/fatcat-api-spec/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: 2019-01-23T05:30:23.378Z
+- Build date: 2019-01-24T21:18:57.859Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api-spec/api.yaml b/rust/fatcat-api-spec/api.yaml
index 14b70c39..e359de36 100644
--- a/rust/fatcat-api-spec/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
@@ -597,8 +597,7 @@ definitions:
type: integer
format: int64
creator_id:
- type: string
- #format: ident
+ <<: *FATCATIDENT
creator:
$ref: "#/definitions/creator_entity"
description: "Optional; GET-only"
@@ -866,8 +865,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/container/lookup:
get:
@@ -1155,8 +1153,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/creator/lookup:
get:
@@ -1421,8 +1418,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/file/lookup:
get:
@@ -1692,8 +1688,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/fileset/edit/{edit_id}:
get:
@@ -1929,8 +1924,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/webcapture/edit/{edit_id}:
get:
@@ -2235,8 +2229,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/release/lookup:
get:
@@ -2526,8 +2519,7 @@ paths:
schema:
type: array
items:
- type: string
- #format: ident
+ <<: *FATCATIDENT
<<: *ENTITYRESPONSES
/work/{ident}/releases:
parameters:
diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 927bb941..b671f676 100644
--- a/rust/fatcat-api-spec/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
@@ -629,6 +629,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_CONTAINER_REDIRECTS"
@@ -1551,6 +1556,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_CREATOR_REDIRECTS"
@@ -2409,6 +2419,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_FILE_REDIRECTS"
@@ -3280,6 +3295,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_FILESET_REDIRECTS"
@@ -4061,6 +4081,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_WEBCAPTURE_REDIRECTS"
@@ -5034,6 +5059,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_RELEASE_REDIRECTS"
@@ -5926,6 +5956,11 @@ paths:
type: "array"
items:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
x-responseId: "FoundEntityRedirects"
x-uppercaseResponseId: "FOUND_ENTITY_REDIRECTS"
uppercase_operation_id: "GET_WORK_REDIRECTS"
@@ -7988,7 +8023,7 @@ definitions:
raw_name: "raw_name"
role: "role"
extra: "{}"
- creator_id: "creator_id"
+ creator_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
index: 1
- raw_affiliation: "raw_affiliation"
creator:
@@ -8006,7 +8041,7 @@ definitions:
raw_name: "raw_name"
role: "role"
extra: "{}"
- creator_id: "creator_id"
+ creator_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
index: 1
pages: "pages"
core_id: "core_id"
@@ -9040,6 +9075,11 @@ definitions:
format: "int64"
creator_id:
type: "string"
+ example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ description: "base32-encoded unique identifier"
+ minLength: 26
+ maxLength: 26
+ pattern: "[a-zA-Z2-7]{26}"
creator:
description: "Optional; GET-only"
$ref: "#/definitions/creator_entity"
@@ -9069,7 +9109,7 @@ definitions:
raw_name: "raw_name"
role: "role"
extra: "{}"
- creator_id: "creator_id"
+ creator_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
index: 1
upperCaseName: "RELEASE_CONTRIB"
auth_oidc:
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index d6e6e07f..f1b657c2 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -692,6 +692,7 @@ pub struct ReleaseContrib {
#[serde(skip_serializing_if = "Option::is_none")]
pub index: Option<i64>,
+ /// base32-encoded unique identifier
#[serde(rename = "creator_id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creator_id: Option<String>,