aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-20 19:15:41 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-20 19:15:59 -0700
commitc06079af0949ac44472c9fdc2fc81766316cb88d (patch)
tree91eba894520e3aa3aff004230c97d7ea13d1a009 /rust/fatcat-api-spec
parentdd9598577da8dfccaf0bb6daff56bab9d1d8e9a6 (diff)
downloadfatcat-c06079af0949ac44472c9fdc2fc81766316cb88d.tar.gz
fatcat-c06079af0949ac44472c9fdc2fc81766316cb88d.zip
schema: allow releases expansion on file/fileset/webcapture
And codegen rust and python
Diffstat (limited to 'rust/fatcat-api-spec')
-rw-r--r--rust/fatcat-api-spec/README.md2
-rw-r--r--rust/fatcat-api-spec/api.yaml21
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml52
-rw-r--r--rust/fatcat-api-spec/src/models.rs18
4 files changed, 84 insertions, 9 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md
index b34efc73..586246d6 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.2.0
-- Build date: 2019-05-15T01:33:17.197Z
+- Build date: 2019-05-21T01:52:14.169Z
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 92253e9d..bac0efaa 100644
--- a/rust/fatcat-api-spec/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
@@ -188,6 +188,11 @@ definitions:
type: array
items:
<<: *FATCATIDENT
+ releases:
+ description: "Optional; GET-only"
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
file_url:
type: object
required:
@@ -218,6 +223,11 @@ definitions:
type: array
items:
<<: *FATCATIDENT
+ releases:
+ description: "Optional; GET-only"
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
fileset_url:
type: object
required:
@@ -278,6 +288,11 @@ definitions:
type: array
items:
<<: *FATCATIDENT
+ releases:
+ description: "Optional; GET-only"
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
webcapture_cdx_line:
type: object
required:
@@ -1382,7 +1397,7 @@ paths:
in: query
type: string
required: false
- description: "List of sub-entities to expand in response. For files, none accepted (yet)."
+ description: "List of sub-entities to expand in response. For files, `releases` is accepted."
- name: hide
in: query
type: string
@@ -1637,7 +1652,7 @@ paths:
in: query
type: string
required: false
- description: "List of sub-entities to expand in response. For filesets, none accepted (yet)."
+ description: "List of sub-entities to expand in response. For filesets, `releases` is accepted."
- name: hide
in: query
type: string
@@ -1858,7 +1873,7 @@ paths:
in: query
type: string
required: false
- description: "List of sub-entities to expand in response. For webcaptures, none accepted (yet)."
+ description: "List of sub-entities to expand in response. For webcaptures, `releases` is accepted."
- name: hide
in: query
type: string
diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 02cdcf36..e437df8f 100644
--- a/rust/fatcat-api-spec/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
@@ -1959,8 +1959,8 @@ paths:
example: "\"ident_example\".to_string()"
- name: "expand"
in: "query"
- description: "List of sub-entities to expand in response. For files, none\
- \ accepted (yet)."
+ description: "List of sub-entities to expand in response. For files, `releases`\
+ \ is accepted."
required: false
type: "string"
formatString: "{:?}"
@@ -2814,8 +2814,8 @@ paths:
example: "\"ident_example\".to_string()"
- name: "expand"
in: "query"
- description: "List of sub-entities to expand in response. For filesets, none\
- \ accepted (yet)."
+ description: "List of sub-entities to expand in response. For filesets, `releases`\
+ \ is accepted."
required: false
type: "string"
formatString: "{:?}"
@@ -3580,7 +3580,7 @@ paths:
- name: "expand"
in: "query"
description: "List of sub-entities to expand in response. For webcaptures,\
- \ none accepted (yet)."
+ \ `releases` is accepted."
required: false
type: "string"
formatString: "{:?}"
@@ -7399,6 +7399,11 @@ definitions:
file_entity:
type: "object"
properties:
+ releases:
+ type: "array"
+ description: "Optional; GET-only"
+ items:
+ $ref: "#/definitions/release_entity"
release_ids:
type: "array"
items:
@@ -7473,6 +7478,9 @@ definitions:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"
urls:
@@ -7510,6 +7518,11 @@ definitions:
fileset_entity:
type: "object"
properties:
+ releases:
+ type: "array"
+ description: "Optional; GET-only"
+ items:
+ $ref: "#/definitions/release_entity"
release_ids:
type: "array"
items:
@@ -7586,6 +7599,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
upperCaseName: "FILESET_ENTITY"
fileset_url:
@@ -7649,6 +7665,11 @@ definitions:
webcapture_entity:
type: "object"
properties:
+ releases:
+ type: "array"
+ description: "Optional; GET-only"
+ items:
+ $ref: "#/definitions/release_entity"
release_ids:
type: "array"
items:
@@ -7740,6 +7761,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
timestamp: "2000-01-23T04:56:07.000+00:00"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
upperCaseName: "WEBCAPTURE_ENTITY"
@@ -7985,6 +8009,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
timestamp: "2000-01-23T04:56:07.000+00:00"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
- redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -8018,6 +8045,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
timestamp: "2000-01-23T04:56:07.000+00:00"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -8127,6 +8157,9 @@ definitions:
- redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"
urls:
@@ -8146,6 +8179,9 @@ definitions:
- redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"
urls:
@@ -8189,6 +8225,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
- redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
urls:
@@ -8216,6 +8255,9 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
+ releases:
+ - null
+ - null
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
container_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
upperCaseName: "RELEASE_ENTITY"
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 0ceed261..c8b68328 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -556,6 +556,11 @@ impl FileAutoBatch {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -616,6 +621,7 @@ pub struct FileEntity {
impl FileEntity {
pub fn new() -> FileEntity {
FileEntity {
+ releases: None,
release_ids: None,
mimetype: None,
urls: None,
@@ -668,6 +674,11 @@ impl FilesetAutoBatch {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FilesetEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -712,6 +723,7 @@ pub struct FilesetEntity {
impl FilesetEntity {
pub fn new() -> FilesetEntity {
FilesetEntity {
+ releases: None,
release_ids: None,
urls: None,
manifest: None,
@@ -1269,6 +1281,11 @@ impl WebcaptureCdxLine {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebcaptureEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -1322,6 +1339,7 @@ pub struct WebcaptureEntity {
impl WebcaptureEntity {
pub fn new() -> WebcaptureEntity {
WebcaptureEntity {
+ releases: None,
release_ids: None,
timestamp: None,
original_url: None,