aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-14 17:09:35 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-14 17:09:35 -0700
commit43ebd22582c33e95479572c213657a781e1eca3f (patch)
tree19416fa7a1396e8540497c354d94ecd0e20f4522 /rust
parent87a65a679dc6885f86658c0003a5fabb2e30e6cb (diff)
downloadfatcat-43ebd22582c33e95479572c213657a781e1eca3f.tar.gz
fatcat-43ebd22582c33e95479572c213657a781e1eca3f.zip
rust codegen
Diffstat (limited to 'rust')
-rw-r--r--rust/fatcat-api-spec/README.md16
-rw-r--r--rust/fatcat-api-spec/api.yaml637
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml980
-rw-r--r--rust/fatcat-api-spec/examples/client.rs189
-rw-r--r--rust/fatcat-api-spec/examples/server_lib/server.rs327
-rw-r--r--rust/fatcat-api-spec/src/client.rs577
-rw-r--r--rust/fatcat-api-spec/src/lib.rs476
-rw-r--r--rust/fatcat-api-spec/src/mimetypes.rs196
-rw-r--r--rust/fatcat-api-spec/src/models.rs126
-rw-r--r--rust/fatcat-api-spec/src/server.rs1119
10 files changed, 2151 insertions, 2492 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md
index 479be91a..93ab4016 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-14T20:29:45.170Z
+- Build date: 2019-05-14T22:45:05.973Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
@@ -57,7 +57,7 @@ To run a client, follow one of the following simple steps:
```
cargo run --example client CreateContainer
-cargo run --example client CreateContainerBatch
+cargo run --example client CreateContainerAutoBatch
cargo run --example client DeleteContainer
cargo run --example client DeleteContainerEdit
cargo run --example client GetContainer
@@ -68,7 +68,7 @@ cargo run --example client GetContainerRevision
cargo run --example client LookupContainer
cargo run --example client UpdateContainer
cargo run --example client CreateCreator
-cargo run --example client CreateCreatorBatch
+cargo run --example client CreateCreatorAutoBatch
cargo run --example client DeleteCreator
cargo run --example client DeleteCreatorEdit
cargo run --example client GetCreator
@@ -95,7 +95,7 @@ cargo run --example client GetEditgroup
cargo run --example client GetEditgroupAnnotations
cargo run --example client GetEditorAnnotations
cargo run --example client CreateFile
-cargo run --example client CreateFileBatch
+cargo run --example client CreateFileAutoBatch
cargo run --example client DeleteFile
cargo run --example client DeleteFileEdit
cargo run --example client GetFile
@@ -106,7 +106,7 @@ cargo run --example client GetFileRevision
cargo run --example client LookupFile
cargo run --example client UpdateFile
cargo run --example client CreateFileset
-cargo run --example client CreateFilesetBatch
+cargo run --example client CreateFilesetAutoBatch
cargo run --example client DeleteFileset
cargo run --example client DeleteFilesetEdit
cargo run --example client GetFileset
@@ -116,7 +116,7 @@ cargo run --example client GetFilesetRedirects
cargo run --example client GetFilesetRevision
cargo run --example client UpdateFileset
cargo run --example client CreateRelease
-cargo run --example client CreateReleaseBatch
+cargo run --example client CreateReleaseAutoBatch
cargo run --example client CreateWork
cargo run --example client DeleteRelease
cargo run --example client DeleteReleaseEdit
@@ -131,7 +131,7 @@ cargo run --example client GetReleaseWebcaptures
cargo run --example client LookupRelease
cargo run --example client UpdateRelease
cargo run --example client CreateWebcapture
-cargo run --example client CreateWebcaptureBatch
+cargo run --example client CreateWebcaptureAutoBatch
cargo run --example client DeleteWebcapture
cargo run --example client DeleteWebcaptureEdit
cargo run --example client GetWebcapture
@@ -140,7 +140,7 @@ cargo run --example client GetWebcaptureHistory
cargo run --example client GetWebcaptureRedirects
cargo run --example client GetWebcaptureRevision
cargo run --example client UpdateWebcapture
-cargo run --example client CreateWorkBatch
+cargo run --example client CreateWorkAutoBatch
cargo run --example client DeleteWork
cargo run --example client DeleteWorkEdit
cargo run --example client GetWork
diff --git a/rust/fatcat-api-spec/api.yaml b/rust/fatcat-api-spec/api.yaml
index 4c2bf20f..e739eae1 100644
--- a/rust/fatcat-api-spec/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
@@ -658,6 +658,90 @@ definitions:
extra:
type: object
additionalProperties: {}
+ container_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/container_entity"
+ creator_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/creator_entity"
+ file_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/file_entity"
+ fileset_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/fileset_entity"
+ webcapture_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/webcapture_entity"
+ release_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
+ work_auto_batch:
+ type: object
+ required:
+ - editgroup
+ - entity_list
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: array
+ items:
+ $ref: "#/definitions/work_entity"
auth_oidc:
type: object
required:
@@ -712,7 +796,12 @@ x-entity-responses: &ENTITYRESPONSES
$ref: "#/definitions/error_response"
paths:
- /container:
+ /editgroup/{editgroup_id}/container:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_container"
tags: # TAGLINE
@@ -723,10 +812,6 @@ paths:
required: true
schema:
$ref: "#/definitions/container_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -736,46 +821,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /container/batch:
+ /editgroup/auto/container/batch:
post:
- operationId: "create_container_batch"
+ operationId: "create_container_auto_batch"
tags: # TAGLINE
- containers # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/container_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/container/{ident}:
@@ -805,6 +868,16 @@ paths:
schema:
$ref: "#/definitions/container_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/container/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_container"
tags: # TAGLINE
@@ -815,10 +888,6 @@ paths:
required: true
schema:
$ref: "#/definitions/container_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -832,11 +901,6 @@ paths:
operationId: "delete_container"
tags: # TAGLINE
- containers # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -959,15 +1023,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/container/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_container_edit"
tags: # TAGLINE
- containers # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -977,7 +1046,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /creator:
+ /editgroup/{editgroup_id}/creator:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_creator"
tags: # TAGLINE
@@ -988,10 +1062,6 @@ paths:
required: true
schema:
$ref: "#/definitions/creator_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1001,46 +1071,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /creator/batch:
+ /editgroup/auto/creator/batch:
post:
- operationId: "create_creator_batch"
+ operationId: "create_creator_auto_batch"
tags: # TAGLINE
- creators # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/creator_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/creator/{ident}:
@@ -1070,6 +1118,16 @@ paths:
schema:
$ref: "#/definitions/creator_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/creator/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_creator"
tags: # TAGLINE
@@ -1080,10 +1138,6 @@ paths:
required: true
schema:
$ref: "#/definitions/creator_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1097,11 +1151,6 @@ paths:
operationId: "delete_creator"
tags: # TAGLINE
- creators # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1247,15 +1296,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/creator/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_creator_edit"
tags: # TAGLINE
- creators # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -1265,7 +1319,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /file:
+ /editgroup/{editgroup_id}/file:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_file"
tags: # TAGLINE
@@ -1276,10 +1335,6 @@ paths:
required: true
schema:
$ref: "#/definitions/file_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1289,46 +1344,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /file/batch:
+ /editgroup/auto/file/batch:
post:
- operationId: "create_file_batch"
+ operationId: "create_file_auto_batch"
tags: # TAGLINE
- files # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/file_entity"
+ $ref: "#/definitions/file_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/file/{ident}:
@@ -1358,6 +1391,16 @@ paths:
schema:
$ref: "#/definitions/file_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/file/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_file"
tags: # TAGLINE
@@ -1368,10 +1411,6 @@ paths:
required: true
schema:
$ref: "#/definitions/file_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1385,11 +1424,6 @@ paths:
operationId: "delete_file"
tags: # TAGLINE
- files # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1517,15 +1551,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/file/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_file_edit"
tags: # TAGLINE
- files # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -1535,7 +1574,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /fileset:
+ /editgroup/{editgroup_id}/fileset:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_fileset"
tags: # TAGLINE
@@ -1546,10 +1590,6 @@ paths:
required: true
schema:
$ref: "#/definitions/fileset_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1559,46 +1599,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /fileset/batch:
+ /editgroup/auto/fileset/batch:
post:
- operationId: "create_fileset_batch"
+ operationId: "create_fileset_auto_batch"
tags: # TAGLINE
- filesets # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/fileset_entity"
+ $ref: "#/definitions/fileset_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/fileset/{ident}:
@@ -1628,6 +1646,16 @@ paths:
schema:
$ref: "#/definitions/fileset_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/fileset/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_fileset"
tags: # TAGLINE
@@ -1638,10 +1666,6 @@ paths:
required: true
schema:
$ref: "#/definitions/fileset_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1655,11 +1679,6 @@ paths:
operationId: "delete_fileset"
tags: # TAGLINE
- filesets # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1753,15 +1772,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/fileset/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_fileset_edit"
tags: # TAGLINE
- filesets # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -1771,7 +1795,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /webcapture:
+ /editgroup/{editgroup_id}/webcapture:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_webcapture"
tags: # TAGLINE
@@ -1782,10 +1811,6 @@ paths:
required: true
schema:
$ref: "#/definitions/webcapture_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1795,46 +1820,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /webcapture/batch:
+ /editgroup/auto/webcapture/batch:
post:
- operationId: "create_webcapture_batch"
+ operationId: "create_webcapture_auto_batch"
tags: # TAGLINE
- webcaptures # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/webcapture_entity"
+ $ref: "#/definitions/webcapture_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/webcapture/{ident}:
@@ -1864,6 +1867,16 @@ paths:
schema:
$ref: "#/definitions/webcapture_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/webcapture/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_webcapture"
tags: # TAGLINE
@@ -1874,10 +1887,6 @@ paths:
required: true
schema:
$ref: "#/definitions/webcapture_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1891,11 +1900,6 @@ paths:
operationId: "delete_webcapture"
tags: # TAGLINE
- webcaptures # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -1989,15 +1993,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/webcapture/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_webcapture_edit"
tags: # TAGLINE
- webcaptures # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -2007,7 +2016,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /release:
+ /editgroup/{editgroup_id}/release:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_release"
tags: # TAGLINE
@@ -2018,10 +2032,6 @@ paths:
required: true
schema:
$ref: "#/definitions/release_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2031,46 +2041,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /release/batch:
+ /editgroup/auto/release/batch:
post:
- operationId: "create_release_batch"
+ operationId: "create_release_auto_batch"
tags: # TAGLINE
- releases # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/release_entity"
+ $ref: "#/definitions/release_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/release/{ident}:
@@ -2100,6 +2088,16 @@ paths:
schema:
$ref: "#/definitions/release_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/release/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_release"
tags: # TAGLINE
@@ -2110,10 +2108,6 @@ paths:
required: true
schema:
$ref: "#/definitions/release_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2127,11 +2121,6 @@ paths:
operationId: "delete_release"
tags: # TAGLINE
- releases # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2356,15 +2345,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/release/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_release_edit"
tags: # TAGLINE
- releases # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
@@ -2374,7 +2368,12 @@ paths:
$ref: "#/definitions/success"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /work:
+ /editgroup/{editgroup_id}/work:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
post:
operationId: "create_work"
tags: # TAGLINE
@@ -2385,10 +2384,6 @@ paths:
required: true
schema:
$ref: "#/definitions/work_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2398,46 +2393,24 @@ paths:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
- /work/batch:
+ /editgroup/auto/work/batch:
post:
- operationId: "create_work_batch"
+ operationId: "create_work_auto_batch"
tags: # TAGLINE
- works # TAGLINE
parameters:
- - name: autoaccept
- in: query
- type: boolean
- required: false
- description: "If true, and editor is authorized, batch is accepted all at once"
- - name: editgroup_id
- in: query
- type: string
- required: false
- description: "Editgroup to auto-accept and apply to all entities (required if 'autoaccept' is True)"
- - name: description
- in: query
- type: string
- required: false
- - name: extra
- in: query
- type: string
- required: false
- - name: entity_list
+ - name: auto_batch
in: body
required: true
schema:
- type: array
- items:
- $ref: "#/definitions/work_entity"
+ $ref: "#/definitions/work_auto_batch"
security:
- Bearer: []
responses:
201:
- description: Created Entities
+ description: Created Editgroup
schema:
- type: array
- items:
- $ref: "#/definitions/entity_edit"
+ $ref: "#/definitions/editgroup"
<<: *ENTITYRESPONSES
<<: *AUTHRESPONSES
/work/{ident}:
@@ -2467,6 +2440,16 @@ paths:
schema:
$ref: "#/definitions/work_entity"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/work/{ident}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ type: string
+ required: true
+ - name: ident
+ in: path
+ type: string
+ required: true
put:
operationId: "update_work"
tags: # TAGLINE
@@ -2477,10 +2460,6 @@ paths:
required: true
schema:
$ref: "#/definitions/work_entity"
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2494,11 +2473,6 @@ paths:
operationId: "delete_work"
tags: # TAGLINE
- works # TAGLINE
- parameters:
- - name: editgroup_id
- in: query
- required: true
- type: string
security:
- Bearer: []
responses:
@@ -2615,15 +2589,20 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /editgroup/{editgroup_id}/work/edit/{edit_id}:
+ parameters:
+ - name: editgroup_id
+ in: path
+ required: true
+ type: string
+ - name: edit_id
+ in: path
+ required: true
+ <<: *FATCATUUID
delete:
operationId: "delete_work_edit"
tags: # TAGLINE
- works # TAGLINE
- parameters:
- - name: edit_id
- in: path
- required: true
- <<: *FATCATUUID
security:
- Bearer: []
responses:
diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 6730a328..0b3abddd 100644
--- a/rust/fatcat-api-spec/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
@@ -23,12 +23,18 @@ consumes:
produces:
- "application/json"
paths:
- /container:
+ /editgroup/{editgroup_id}/container:
post:
tags:
- "containers"
operationId: "create_container"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -41,12 +47,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_CONTAINER"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -109,67 +109,37 @@ paths:
- Bearer: []
operation_id: "create_container"
uppercase_operation_id: "CREATE_CONTAINER"
- path: "/container"
+ path: "/editgroup/:editgroup_id/container"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /container/batch:
+ /editgroup/auto/container/batch:
post:
tags:
- "containers"
- operationId: "create_container_batch"
+ operationId: "create_container_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/container_auto_batch"
+ uppercase_data_type: "CONTAINERAUTOBATCH"
+ refName: "container_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -177,7 +147,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -189,7 +159,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -198,7 +168,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -207,7 +177,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -216,16 +186,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_container_batch"
- uppercase_operation_id: "CREATE_CONTAINER_BATCH"
- path: "/container/batch"
+ operation_id: "create_container_auto_batch"
+ uppercase_operation_id: "CREATE_CONTAINER_AUTO_BATCH"
+ path: "/editgroup/auto/container/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/container/{ident}:
get:
tags:
@@ -296,11 +267,18 @@ paths:
path: "/container/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/container/{ident}:
put:
tags:
- "containers"
operationId: "update_container"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -319,12 +297,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_CONTAINER"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -387,7 +359,7 @@ paths:
- Bearer: []
operation_id: "update_container"
uppercase_operation_id: "UPDATE_CONTAINER"
- path: "/container/:ident"
+ path: "/editgroup/:editgroup_id/container/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -396,18 +368,18 @@ paths:
- "containers"
operationId: "delete_container"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -470,7 +442,7 @@ paths:
- Bearer: []
operation_id: "delete_container"
uppercase_operation_id: "DELETE_CONTAINER"
- path: "/container/:ident"
+ path: "/editgroup/:editgroup_id/container/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/container/rev/{rev_id}:
@@ -806,11 +778,18 @@ paths:
path: "/container/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/container/edit/{edit_id}:
delete:
tags:
- "containers"
operationId: "delete_container_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -883,15 +862,21 @@ paths:
- Bearer: []
operation_id: "delete_container_edit"
uppercase_operation_id: "DELETE_CONTAINER_EDIT"
- path: "/container/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/container/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /creator:
+ /editgroup/{editgroup_id}/creator:
post:
tags:
- "creators"
operationId: "create_creator"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -904,12 +889,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_CREATOR"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -972,67 +951,37 @@ paths:
- Bearer: []
operation_id: "create_creator"
uppercase_operation_id: "CREATE_CREATOR"
- path: "/creator"
+ path: "/editgroup/:editgroup_id/creator"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /creator/batch:
+ /editgroup/auto/creator/batch:
post:
tags:
- "creators"
- operationId: "create_creator_batch"
+ operationId: "create_creator_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/creator_auto_batch"
+ uppercase_data_type: "CREATORAUTOBATCH"
+ refName: "creator_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -1040,7 +989,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -1052,7 +1001,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -1061,7 +1010,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -1070,7 +1019,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -1079,16 +1028,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_creator_batch"
- uppercase_operation_id: "CREATE_CREATOR_BATCH"
- path: "/creator/batch"
+ operation_id: "create_creator_auto_batch"
+ uppercase_operation_id: "CREATE_CREATOR_AUTO_BATCH"
+ path: "/editgroup/auto/creator/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/creator/{ident}:
get:
tags:
@@ -1159,11 +1109,18 @@ paths:
path: "/creator/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/creator/{ident}:
put:
tags:
- "creators"
operationId: "update_creator"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -1182,12 +1139,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_CREATOR"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -1250,7 +1201,7 @@ paths:
- Bearer: []
operation_id: "update_creator"
uppercase_operation_id: "UPDATE_CREATOR"
- path: "/creator/:ident"
+ path: "/editgroup/:editgroup_id/creator/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -1259,18 +1210,18 @@ paths:
- "creators"
operationId: "delete_creator"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -1333,7 +1284,7 @@ paths:
- Bearer: []
operation_id: "delete_creator"
uppercase_operation_id: "DELETE_CREATOR"
- path: "/creator/:ident"
+ path: "/editgroup/:editgroup_id/creator/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/creator/rev/{rev_id}:
@@ -1733,11 +1684,18 @@ paths:
path: "/creator/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/creator/edit/{edit_id}:
delete:
tags:
- "creators"
operationId: "delete_creator_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -1810,15 +1768,21 @@ paths:
- Bearer: []
operation_id: "delete_creator_edit"
uppercase_operation_id: "DELETE_CREATOR_EDIT"
- path: "/creator/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/creator/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /file:
+ /editgroup/{editgroup_id}/file:
post:
tags:
- "files"
operationId: "create_file"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -1831,12 +1795,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_FILE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -1899,67 +1857,37 @@ paths:
- Bearer: []
operation_id: "create_file"
uppercase_operation_id: "CREATE_FILE"
- path: "/file"
+ path: "/editgroup/:editgroup_id/file"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /file/batch:
+ /editgroup/auto/file/batch:
post:
tags:
- "files"
- operationId: "create_file_batch"
+ operationId: "create_file_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/file_entity"
+ $ref: "#/definitions/file_auto_batch"
+ uppercase_data_type: "FILEAUTOBATCH"
+ refName: "file_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_FILE_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -1967,7 +1895,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -1979,7 +1907,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -1988,7 +1916,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -1997,7 +1925,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -2006,16 +1934,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_FILE_BATCH"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_file_batch"
- uppercase_operation_id: "CREATE_FILE_BATCH"
- path: "/file/batch"
+ operation_id: "create_file_auto_batch"
+ uppercase_operation_id: "CREATE_FILE_AUTO_BATCH"
+ path: "/editgroup/auto/file/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/file/{ident}:
get:
tags:
@@ -2086,11 +2015,18 @@ paths:
path: "/file/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/file/{ident}:
put:
tags:
- "files"
operationId: "update_file"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -2109,12 +2045,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_FILE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -2177,7 +2107,7 @@ paths:
- Bearer: []
operation_id: "update_file"
uppercase_operation_id: "UPDATE_FILE"
- path: "/file/:ident"
+ path: "/editgroup/:editgroup_id/file/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -2186,18 +2116,18 @@ paths:
- "files"
operationId: "delete_file"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -2260,7 +2190,7 @@ paths:
- Bearer: []
operation_id: "delete_file"
uppercase_operation_id: "DELETE_FILE"
- path: "/file/:ident"
+ path: "/editgroup/:editgroup_id/file/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/file/rev/{rev_id}:
@@ -2609,11 +2539,18 @@ paths:
path: "/file/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/file/edit/{edit_id}:
delete:
tags:
- "files"
operationId: "delete_file_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -2686,15 +2623,21 @@ paths:
- Bearer: []
operation_id: "delete_file_edit"
uppercase_operation_id: "DELETE_FILE_EDIT"
- path: "/file/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/file/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /fileset:
+ /editgroup/{editgroup_id}/fileset:
post:
tags:
- "filesets"
operationId: "create_fileset"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -2707,12 +2650,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_FILESET"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -2775,67 +2712,37 @@ paths:
- Bearer: []
operation_id: "create_fileset"
uppercase_operation_id: "CREATE_FILESET"
- path: "/fileset"
+ path: "/editgroup/:editgroup_id/fileset"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /fileset/batch:
+ /editgroup/auto/fileset/batch:
post:
tags:
- "filesets"
- operationId: "create_fileset_batch"
+ operationId: "create_fileset_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/fileset_entity"
+ $ref: "#/definitions/fileset_auto_batch"
+ uppercase_data_type: "FILESETAUTOBATCH"
+ refName: "fileset_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -2843,7 +2750,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -2855,7 +2762,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -2864,7 +2771,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -2873,7 +2780,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -2882,16 +2789,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_fileset_batch"
- uppercase_operation_id: "CREATE_FILESET_BATCH"
- path: "/fileset/batch"
+ operation_id: "create_fileset_auto_batch"
+ uppercase_operation_id: "CREATE_FILESET_AUTO_BATCH"
+ path: "/editgroup/auto/fileset/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/fileset/{ident}:
get:
tags:
@@ -2962,11 +2870,18 @@ paths:
path: "/fileset/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/fileset/{ident}:
put:
tags:
- "filesets"
operationId: "update_fileset"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -2985,12 +2900,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_FILESET"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -3053,7 +2962,7 @@ paths:
- Bearer: []
operation_id: "update_fileset"
uppercase_operation_id: "UPDATE_FILESET"
- path: "/fileset/:ident"
+ path: "/editgroup/:editgroup_id/fileset/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -3062,18 +2971,18 @@ paths:
- "filesets"
operationId: "delete_fileset"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -3136,7 +3045,7 @@ paths:
- Bearer: []
operation_id: "delete_fileset"
uppercase_operation_id: "DELETE_FILESET"
- path: "/fileset/:ident"
+ path: "/editgroup/:editgroup_id/fileset/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/fileset/rev/{rev_id}:
@@ -3395,11 +3304,18 @@ paths:
path: "/fileset/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/fileset/edit/{edit_id}:
delete:
tags:
- "filesets"
operationId: "delete_fileset_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -3472,15 +3388,21 @@ paths:
- Bearer: []
operation_id: "delete_fileset_edit"
uppercase_operation_id: "DELETE_FILESET_EDIT"
- path: "/fileset/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/fileset/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /webcapture:
+ /editgroup/{editgroup_id}/webcapture:
post:
tags:
- "webcaptures"
operationId: "create_webcapture"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -3493,12 +3415,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_WEBCAPTURE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -3561,67 +3477,37 @@ paths:
- Bearer: []
operation_id: "create_webcapture"
uppercase_operation_id: "CREATE_WEBCAPTURE"
- path: "/webcapture"
+ path: "/editgroup/:editgroup_id/webcapture"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /webcapture/batch:
+ /editgroup/auto/webcapture/batch:
post:
tags:
- "webcaptures"
- operationId: "create_webcapture_batch"
+ operationId: "create_webcapture_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/webcapture_entity"
+ $ref: "#/definitions/webcapture_auto_batch"
+ uppercase_data_type: "WEBCAPTUREAUTOBATCH"
+ refName: "webcapture_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -3629,7 +3515,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -3641,7 +3527,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -3650,7 +3536,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -3659,7 +3545,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -3668,16 +3554,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_webcapture_batch"
- uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH"
- path: "/webcapture/batch"
+ operation_id: "create_webcapture_auto_batch"
+ uppercase_operation_id: "CREATE_WEBCAPTURE_AUTO_BATCH"
+ path: "/editgroup/auto/webcapture/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/webcapture/{ident}:
get:
tags:
@@ -3748,11 +3635,18 @@ paths:
path: "/webcapture/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/webcapture/{ident}:
put:
tags:
- "webcaptures"
operationId: "update_webcapture"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -3771,12 +3665,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_WEBCAPTURE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -3839,7 +3727,7 @@ paths:
- Bearer: []
operation_id: "update_webcapture"
uppercase_operation_id: "UPDATE_WEBCAPTURE"
- path: "/webcapture/:ident"
+ path: "/editgroup/:editgroup_id/webcapture/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -3848,18 +3736,18 @@ paths:
- "webcaptures"
operationId: "delete_webcapture"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -3922,7 +3810,7 @@ paths:
- Bearer: []
operation_id: "delete_webcapture"
uppercase_operation_id: "DELETE_WEBCAPTURE"
- path: "/webcapture/:ident"
+ path: "/editgroup/:editgroup_id/webcapture/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/webcapture/rev/{rev_id}:
@@ -4181,11 +4069,18 @@ paths:
path: "/webcapture/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/webcapture/edit/{edit_id}:
delete:
tags:
- "webcaptures"
operationId: "delete_webcapture_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -4258,15 +4153,21 @@ paths:
- Bearer: []
operation_id: "delete_webcapture_edit"
uppercase_operation_id: "DELETE_WEBCAPTURE_EDIT"
- path: "/webcapture/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/webcapture/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /release:
+ /editgroup/{editgroup_id}/release:
post:
tags:
- "releases"
operationId: "create_release"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -4279,12 +4180,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_RELEASE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -4347,67 +4242,37 @@ paths:
- Bearer: []
operation_id: "create_release"
uppercase_operation_id: "CREATE_RELEASE"
- path: "/release"
+ path: "/editgroup/:editgroup_id/release"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /release/batch:
+ /editgroup/auto/release/batch:
post:
tags:
- "releases"
- operationId: "create_release_batch"
+ operationId: "create_release_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/release_entity"
+ $ref: "#/definitions/release_auto_batch"
+ uppercase_data_type: "RELEASEAUTOBATCH"
+ refName: "release_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -4415,7 +4280,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -4427,7 +4292,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -4436,7 +4301,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -4445,7 +4310,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -4454,16 +4319,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_release_batch"
- uppercase_operation_id: "CREATE_RELEASE_BATCH"
- path: "/release/batch"
+ operation_id: "create_release_auto_batch"
+ uppercase_operation_id: "CREATE_RELEASE_AUTO_BATCH"
+ path: "/editgroup/auto/release/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/release/{ident}:
get:
tags:
@@ -4534,11 +4400,18 @@ paths:
path: "/release/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/release/{ident}:
put:
tags:
- "releases"
operationId: "update_release"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -4557,12 +4430,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_RELEASE"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -4625,7 +4492,7 @@ paths:
- Bearer: []
operation_id: "update_release"
uppercase_operation_id: "UPDATE_RELEASE"
- path: "/release/:ident"
+ path: "/editgroup/:editgroup_id/release/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -4634,18 +4501,18 @@ paths:
- "releases"
operationId: "delete_release"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -4708,7 +4575,7 @@ paths:
- Bearer: []
operation_id: "delete_release"
uppercase_operation_id: "DELETE_RELEASE"
- path: "/release/:ident"
+ path: "/editgroup/:editgroup_id/release/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/release/rev/{rev_id}:
@@ -5282,11 +5149,18 @@ paths:
path: "/release/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/release/edit/{edit_id}:
delete:
tags:
- "releases"
operationId: "delete_release_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -5359,15 +5233,21 @@ paths:
- Bearer: []
operation_id: "delete_release_edit"
uppercase_operation_id: "DELETE_RELEASE_EDIT"
- path: "/release/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/release/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
- /work:
+ /editgroup/{editgroup_id}/work:
post:
tags:
- "releases"
operationId: "create_work"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- in: "body"
name: "entity"
required: true
@@ -5380,12 +5260,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "CREATE_WORK"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
201:
description: "Created Entity"
@@ -5448,67 +5322,37 @@ paths:
- Bearer: []
operation_id: "create_work"
uppercase_operation_id: "CREATE_WORK"
- path: "/work"
+ path: "/editgroup/:editgroup_id/work"
HttpMethod: "Post"
httpmethod: "post"
noClientExample: true
- /work/batch:
+ /editgroup/auto/work/batch:
post:
tags:
- "works"
- operationId: "create_work_batch"
+ operationId: "create_work_auto_batch"
parameters:
- - name: "autoaccept"
- in: "query"
- description: "If true, and editor is authorized, batch is accepted all at\
- \ once"
- required: false
- type: "boolean"
- formatString: "{:?}"
- example: "Some(true)"
- - name: "editgroup_id"
- in: "query"
- description: "Editgroup to auto-accept and apply to all entities (required\
- \ if 'autoaccept' is True)"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"editgroup_id_example\".to_string())"
- - name: "description"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"description_example\".to_string())"
- - name: "extra"
- in: "query"
- required: false
- type: "string"
- formatString: "{:?}"
- example: "Some(\"extra_example\".to_string())"
- in: "body"
- name: "entity_list"
+ name: "auto_batch"
required: true
schema:
- type: "array"
- items:
- $ref: "#/definitions/work_entity"
+ $ref: "#/definitions/work_auto_batch"
+ uppercase_data_type: "WORKAUTOBATCH"
+ refName: "work_auto_batch"
formatString: "{:?}"
- example: "&Vec::new()"
+ example: "???"
model_key: "editgroup_edits"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
consumesJson: true
responses:
201:
- description: "Created Entities"
+ description: "Created Editgroup"
schema:
- type: "array"
- items:
- $ref: "#/definitions/entity_edit"
- x-responseId: "CreatedEntities"
- x-uppercaseResponseId: "CREATED_ENTITIES"
- uppercase_operation_id: "CREATE_WORK_BATCH"
- uppercase_data_type: "VEC<ENTITYEDIT>"
+ $ref: "#/definitions/editgroup"
+ x-responseId: "CreatedEditgroup"
+ x-uppercaseResponseId: "CREATED_EDITGROUP"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
+ uppercase_data_type: "EDITGROUP"
producesJson: true
400:
description: "Bad Request"
@@ -5516,7 +5360,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "BadRequest"
x-uppercaseResponseId: "BAD_REQUEST"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
401:
@@ -5528,7 +5372,7 @@ paths:
type: "string"
x-responseId: "NotAuthorized"
x-uppercaseResponseId: "NOT_AUTHORIZED"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
403:
@@ -5537,7 +5381,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "Forbidden"
x-uppercaseResponseId: "FORBIDDEN"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
404:
@@ -5546,7 +5390,7 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
500:
@@ -5555,16 +5399,17 @@ paths:
$ref: "#/definitions/error_response"
x-responseId: "GenericError"
x-uppercaseResponseId: "GENERIC_ERROR"
- uppercase_operation_id: "CREATE_WORK_BATCH"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
uppercase_data_type: "ERRORRESPONSE"
producesJson: true
security:
- Bearer: []
- operation_id: "create_work_batch"
- uppercase_operation_id: "CREATE_WORK_BATCH"
- path: "/work/batch"
+ operation_id: "create_work_auto_batch"
+ uppercase_operation_id: "CREATE_WORK_AUTO_BATCH"
+ path: "/editgroup/auto/work/batch"
HttpMethod: "Post"
httpmethod: "post"
+ noClientExample: true
/work/{ident}:
get:
tags:
@@ -5635,11 +5480,18 @@ paths:
path: "/work/:ident"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/work/{ident}:
put:
tags:
- "works"
operationId: "update_work"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "ident"
in: "path"
required: true
@@ -5658,12 +5510,6 @@ paths:
model_key: "editgroup_edits"
uppercase_operation_id: "UPDATE_WORK"
consumesJson: true
- - name: "editgroup_id"
- in: "query"
- required: true
- type: "string"
- formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
responses:
200:
description: "Updated Entity"
@@ -5726,7 +5572,7 @@ paths:
- Bearer: []
operation_id: "update_work"
uppercase_operation_id: "UPDATE_WORK"
- path: "/work/:ident"
+ path: "/editgroup/:editgroup_id/work/:ident"
HttpMethod: "Put"
httpmethod: "put"
noClientExample: true
@@ -5735,18 +5581,18 @@ paths:
- "works"
operationId: "delete_work"
parameters:
- - name: "ident"
+ - name: "editgroup_id"
in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"ident_example\".to_string()"
- - name: "editgroup_id"
- in: "query"
+ example: "\"editgroup_id_example\".to_string()"
+ - name: "ident"
+ in: "path"
required: true
type: "string"
formatString: "\\\"{}\\\""
- example: "\"editgroup_id_example\".to_string()"
+ example: "\"ident_example\".to_string()"
responses:
200:
description: "Deleted Entity"
@@ -5809,7 +5655,7 @@ paths:
- Bearer: []
operation_id: "delete_work"
uppercase_operation_id: "DELETE_WORK"
- path: "/work/:ident"
+ path: "/editgroup/:editgroup_id/work/:ident"
HttpMethod: "Delete"
httpmethod: "delete"
/work/rev/{rev_id}:
@@ -6132,11 +5978,18 @@ paths:
path: "/work/edit/:edit_id"
HttpMethod: "Get"
httpmethod: "get"
+ /editgroup/{editgroup_id}/work/edit/{edit_id}:
delete:
tags:
- "works"
operationId: "delete_work_edit"
parameters:
+ - name: "editgroup_id"
+ in: "path"
+ required: true
+ type: "string"
+ formatString: "\\\"{}\\\""
+ example: "\"editgroup_id_example\".to_string()"
- name: "edit_id"
in: "path"
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
@@ -6209,7 +6062,7 @@ paths:
- Bearer: []
operation_id: "delete_work_edit"
uppercase_operation_id: "DELETE_WORK_EDIT"
- path: "/work/edit/:edit_id"
+ path: "/editgroup/:editgroup_id/work/edit/:edit_id"
HttpMethod: "Delete"
httpmethod: "delete"
/editor/{editor_id}:
@@ -9355,6 +9208,97 @@ definitions:
index: 1
given_name: "given_name"
upperCaseName: "RELEASE_CONTRIB"
+ container_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/container_entity"
+ upperCaseName: "CONTAINER_AUTO_BATCH"
+ creator_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/creator_entity"
+ upperCaseName: "CREATOR_AUTO_BATCH"
+ file_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/file_entity"
+ upperCaseName: "FILE_AUTO_BATCH"
+ fileset_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/fileset_entity"
+ upperCaseName: "FILESET_AUTO_BATCH"
+ webcapture_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/webcapture_entity"
+ upperCaseName: "WEBCAPTURE_AUTO_BATCH"
+ release_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/release_entity"
+ upperCaseName: "RELEASE_AUTO_BATCH"
+ work_auto_batch:
+ type: "object"
+ required:
+ - "editgroup"
+ - "entity_list"
+ properties:
+ editgroup:
+ $ref: "#/definitions/editgroup"
+ entity_list:
+ type: "array"
+ items:
+ $ref: "#/definitions/work_entity"
+ upperCaseName: "WORK_AUTO_BATCH"
auth_oidc:
type: "object"
required:
diff --git a/rust/fatcat-api-spec/examples/client.rs b/rust/fatcat-api-spec/examples/client.rs
index 371d6ae2..3cb0df50 100644
--- a/rust/fatcat-api-spec/examples/client.rs
+++ b/rust/fatcat-api-spec/examples/client.rs
@@ -12,9 +12,9 @@ extern crate uuid;
use clap::{App, Arg};
#[allow(unused_imports)]
use fatcat::{
- AcceptEditgroupResponse, ApiError, ApiNoContext, AuthCheckResponse, AuthOidcResponse, ContextWrapperExt, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse,
- CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateFilesetBatchResponse, CreateFilesetResponse,
- CreateReleaseBatchResponse, CreateReleaseResponse, CreateWebcaptureBatchResponse, CreateWebcaptureResponse, CreateWorkBatchResponse, CreateWorkResponse, DeleteContainerEditResponse,
+ AcceptEditgroupResponse, ApiError, ApiNoContext, AuthCheckResponse, AuthOidcResponse, ContextWrapperExt, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse,
+ CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse,
+ CreateReleaseAutoBatchResponse, CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, DeleteContainerEditResponse,
DeleteContainerResponse, DeleteCreatorEditResponse, DeleteCreatorResponse, DeleteFileEditResponse, DeleteFileResponse, DeleteFilesetEditResponse, DeleteFilesetResponse, DeleteReleaseEditResponse,
DeleteReleaseResponse, DeleteWebcaptureEditResponse, DeleteWebcaptureResponse, DeleteWorkEditResponse, DeleteWorkResponse, GetChangelogEntryResponse, GetChangelogResponse,
GetContainerEditResponse, GetContainerHistoryResponse, GetContainerRedirectsResponse, GetContainerResponse, GetContainerRevisionResponse, GetCreatorEditResponse, GetCreatorHistoryResponse,
@@ -35,7 +35,6 @@ fn main() {
Arg::with_name("operation")
.help("Sets the operation to run")
.possible_values(&[
- "CreateContainerBatch",
"DeleteContainer",
"DeleteContainerEdit",
"GetContainer",
@@ -44,7 +43,6 @@ fn main() {
"GetContainerRedirects",
"GetContainerRevision",
"LookupContainer",
- "CreateCreatorBatch",
"DeleteCreator",
"DeleteCreatorEdit",
"GetCreator",
@@ -64,7 +62,6 @@ fn main() {
"GetEditgroup",
"GetEditgroupAnnotations",
"GetEditorAnnotations",
- "CreateFileBatch",
"DeleteFile",
"DeleteFileEdit",
"GetFile",
@@ -73,7 +70,6 @@ fn main() {
"GetFileRedirects",
"GetFileRevision",
"LookupFile",
- "CreateFilesetBatch",
"DeleteFileset",
"DeleteFilesetEdit",
"GetFileset",
@@ -81,7 +77,6 @@ fn main() {
"GetFilesetHistory",
"GetFilesetRedirects",
"GetFilesetRevision",
- "CreateReleaseBatch",
"DeleteRelease",
"DeleteReleaseEdit",
"GetRelease",
@@ -93,7 +88,6 @@ fn main() {
"GetReleaseRevision",
"GetReleaseWebcaptures",
"LookupRelease",
- "CreateWebcaptureBatch",
"DeleteWebcapture",
"DeleteWebcaptureEdit",
"GetWebcapture",
@@ -101,7 +95,6 @@ fn main() {
"GetWebcaptureHistory",
"GetWebcaptureRedirects",
"GetWebcaptureRevision",
- "CreateWorkBatch",
"DeleteWork",
"DeleteWorkEdit",
"GetWork",
@@ -140,29 +133,22 @@ fn main() {
match matches.value_of("operation") {
// Disabled because there's no example.
// Some("CreateContainer") => {
- // let result = client.create_container(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_container("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateContainerBatch") => {
- let result = client
- .create_container_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateContainerAutoBatch") => {
+ // let result = client.create_container_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteContainer") => {
- let result = client.delete_container("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_container("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteContainerEdit") => {
- let result = client.delete_container_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_container_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -209,35 +195,28 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateContainer") => {
- // let result = client.update_container("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_container("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
// Disabled because there's no example.
// Some("CreateCreator") => {
- // let result = client.create_creator(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_creator("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateCreatorBatch") => {
- let result = client
- .create_creator_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateCreatorAutoBatch") => {
+ // let result = client.create_creator_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteCreator") => {
- let result = client.delete_creator("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_creator("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteCreatorEdit") => {
- let result = client.delete_creator_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_creator_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -289,7 +268,7 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateCreator") => {
- // let result = client.update_creator("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_creator("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
Some("AuthCheck") => {
@@ -371,29 +350,22 @@ fn main() {
// Disabled because there's no example.
// Some("CreateFile") => {
- // let result = client.create_file(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_file("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateFileBatch") => {
- let result = client
- .create_file_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateFileAutoBatch") => {
+ // let result = client.create_file_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteFile") => {
- let result = client.delete_file("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_file("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteFileEdit") => {
- let result = client.delete_file_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_file_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -441,35 +413,28 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateFile") => {
- // let result = client.update_file("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_file("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
// Disabled because there's no example.
// Some("CreateFileset") => {
- // let result = client.create_fileset(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_fileset("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateFilesetBatch") => {
- let result = client
- .create_fileset_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateFilesetAutoBatch") => {
+ // let result = client.create_fileset_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteFileset") => {
- let result = client.delete_fileset("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_fileset("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteFilesetEdit") => {
- let result = client.delete_fileset_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_fileset_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -504,40 +469,34 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateFileset") => {
- // let result = client.update_fileset("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_fileset("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
// Disabled because there's no example.
// Some("CreateRelease") => {
- // let result = client.create_release(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_release("editgroup_id_example".to_string(), ???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
+
+ // Disabled because there's no example.
+ // Some("CreateReleaseAutoBatch") => {
+ // let result = client.create_release_auto_batch(???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateReleaseBatch") => {
- let result = client
- .create_release_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
// Disabled because there's no example.
// Some("CreateWork") => {
- // let result = client.create_work(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_work("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
Some("DeleteRelease") => {
- let result = client.delete_release("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_release("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteReleaseEdit") => {
- let result = client.delete_release_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_release_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -607,35 +566,28 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateRelease") => {
- // let result = client.update_release("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_release("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
// Disabled because there's no example.
// Some("CreateWebcapture") => {
- // let result = client.create_webcapture(???, "editgroup_id_example".to_string()).wait();
+ // let result = client.create_webcapture("editgroup_id_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateWebcaptureBatch") => {
- let result = client
- .create_webcapture_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateWebcaptureAutoBatch") => {
+ // let result = client.create_webcapture_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteWebcapture") => {
- let result = client.delete_webcapture("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_webcapture("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteWebcaptureEdit") => {
- let result = client.delete_webcapture_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_webcapture_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -670,29 +622,22 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateWebcapture") => {
- // let result = client.update_webcapture("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_webcapture("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
- Some("CreateWorkBatch") => {
- let result = client
- .create_work_batch(
- &Vec::new(),
- Some(true),
- Some("editgroup_id_example".to_string()),
- Some("description_example".to_string()),
- Some("extra_example".to_string()),
- )
- .wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
+ // Disabled because there's no example.
+ // Some("CreateWorkAutoBatch") => {
+ // let result = client.create_work_auto_batch(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("DeleteWork") => {
- let result = client.delete_work("ident_example".to_string(), "editgroup_id_example".to_string()).wait();
+ let result = client.delete_work("editgroup_id_example".to_string(), "ident_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
Some("DeleteWorkEdit") => {
- let result = client.delete_work_edit("edit_id_example".to_string()).wait();
+ let result = client.delete_work_edit("editgroup_id_example".to_string(), "edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -732,7 +677,7 @@ fn main() {
// Disabled because there's no example.
// Some("UpdateWork") => {
- // let result = client.update_work("ident_example".to_string(), ???, "editgroup_id_example".to_string()).wait();
+ // let result = client.update_work("editgroup_id_example".to_string(), "ident_example".to_string(), ???).wait();
// println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
// },
_ => panic!("Invalid operation provided"),
diff --git a/rust/fatcat-api-spec/examples/server_lib/server.rs b/rust/fatcat-api-spec/examples/server_lib/server.rs
index 378b4285..c9f92d33 100644
--- a/rust/fatcat-api-spec/examples/server_lib/server.rs
+++ b/rust/fatcat-api-spec/examples/server_lib/server.rs
@@ -11,72 +11,65 @@ use swagger;
use fatcat::models;
use fatcat::{
- AcceptEditgroupResponse, Api, ApiError, AuthCheckResponse, AuthOidcResponse, Context, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse, CreateCreatorResponse,
- CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateFilesetBatchResponse, CreateFilesetResponse, CreateReleaseBatchResponse,
- CreateReleaseResponse, CreateWebcaptureBatchResponse, CreateWebcaptureResponse, CreateWorkBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, DeleteContainerResponse,
- DeleteCreatorEditResponse, DeleteCreatorResponse, DeleteFileEditResponse, DeleteFileResponse, DeleteFilesetEditResponse, DeleteFilesetResponse, DeleteReleaseEditResponse, DeleteReleaseResponse,
- DeleteWebcaptureEditResponse, DeleteWebcaptureResponse, DeleteWorkEditResponse, DeleteWorkResponse, GetChangelogEntryResponse, GetChangelogResponse, GetContainerEditResponse,
- GetContainerHistoryResponse, GetContainerRedirectsResponse, GetContainerResponse, GetContainerRevisionResponse, GetCreatorEditResponse, GetCreatorHistoryResponse, GetCreatorRedirectsResponse,
- GetCreatorReleasesResponse, GetCreatorResponse, GetCreatorRevisionResponse, GetEditgroupAnnotationsResponse, GetEditgroupResponse, GetEditgroupsReviewableResponse, GetEditorAnnotationsResponse,
- GetEditorEditgroupsResponse, GetEditorResponse, GetFileEditResponse, GetFileHistoryResponse, GetFileRedirectsResponse, GetFileResponse, GetFileRevisionResponse, GetFilesetEditResponse,
- GetFilesetHistoryResponse, GetFilesetRedirectsResponse, GetFilesetResponse, GetFilesetRevisionResponse, GetReleaseEditResponse, GetReleaseFilesResponse, GetReleaseFilesetsResponse,
- GetReleaseHistoryResponse, GetReleaseRedirectsResponse, GetReleaseResponse, GetReleaseRevisionResponse, GetReleaseWebcapturesResponse, GetWebcaptureEditResponse, GetWebcaptureHistoryResponse,
- GetWebcaptureRedirectsResponse, GetWebcaptureResponse, GetWebcaptureRevisionResponse, GetWorkEditResponse, GetWorkHistoryResponse, GetWorkRedirectsResponse, GetWorkReleasesResponse,
- GetWorkResponse, GetWorkRevisionResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse, UpdateContainerResponse, UpdateCreatorResponse,
- UpdateEditgroupResponse, UpdateEditorResponse, UpdateFileResponse, UpdateFilesetResponse, UpdateReleaseResponse, UpdateWebcaptureResponse, UpdateWorkResponse,
+ AcceptEditgroupResponse, Api, ApiError, AuthCheckResponse, AuthOidcResponse, Context, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse,
+ CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse,
+ CreateReleaseAutoBatchResponse, CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, DeleteContainerEditResponse,
+ DeleteContainerResponse, DeleteCreatorEditResponse, DeleteCreatorResponse, DeleteFileEditResponse, DeleteFileResponse, DeleteFilesetEditResponse, DeleteFilesetResponse, DeleteReleaseEditResponse,
+ DeleteReleaseResponse, DeleteWebcaptureEditResponse, DeleteWebcaptureResponse, DeleteWorkEditResponse, DeleteWorkResponse, GetChangelogEntryResponse, GetChangelogResponse,
+ GetContainerEditResponse, GetContainerHistoryResponse, GetContainerRedirectsResponse, GetContainerResponse, GetContainerRevisionResponse, GetCreatorEditResponse, GetCreatorHistoryResponse,
+ GetCreatorRedirectsResponse, GetCreatorReleasesResponse, GetCreatorResponse, GetCreatorRevisionResponse, GetEditgroupAnnotationsResponse, GetEditgroupResponse, GetEditgroupsReviewableResponse,
+ GetEditorAnnotationsResponse, GetEditorEditgroupsResponse, GetEditorResponse, GetFileEditResponse, GetFileHistoryResponse, GetFileRedirectsResponse, GetFileResponse, GetFileRevisionResponse,
+ GetFilesetEditResponse, GetFilesetHistoryResponse, GetFilesetRedirectsResponse, GetFilesetResponse, GetFilesetRevisionResponse, GetReleaseEditResponse, GetReleaseFilesResponse,
+ GetReleaseFilesetsResponse, GetReleaseHistoryResponse, GetReleaseRedirectsResponse, GetReleaseResponse, GetReleaseRevisionResponse, GetReleaseWebcapturesResponse, GetWebcaptureEditResponse,
+ GetWebcaptureHistoryResponse, GetWebcaptureRedirectsResponse, GetWebcaptureResponse, GetWebcaptureRevisionResponse, GetWorkEditResponse, GetWorkHistoryResponse, GetWorkRedirectsResponse,
+ GetWorkReleasesResponse, GetWorkResponse, GetWorkRevisionResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse, UpdateContainerResponse,
+ UpdateCreatorResponse, UpdateEditgroupResponse, UpdateEditorResponse, UpdateFileResponse, UpdateFilesetResponse, UpdateReleaseResponse, UpdateWebcaptureResponse, UpdateWorkResponse,
};
#[derive(Copy, Clone)]
pub struct Server;
impl Api for Server {
- fn create_container(&self, entity: models::ContainerEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
+ fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_container({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_container(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_container_batch(
- &self,
- entity_list: &Vec<models::ContainerEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send> {
+ fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box<Future<Item = CreateContainerAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_container_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_container_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_container(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
+ fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_container(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_container_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
+ fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_container_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_container_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -147,65 +140,58 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
+ fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_container(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_container(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
+ fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_creator({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_creator(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_creator_batch(
- &self,
- entity_list: &Vec<models::CreatorEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send> {
+ fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box<Future<Item = CreateCreatorAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_creator_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_creator_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_creator(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
+ fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_creator(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_creator_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
+ fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_creator_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_creator_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -287,13 +273,13 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
+ fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_creator(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_creator(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
@@ -457,53 +443,46 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn create_file(&self, entity: models::FileEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
+ fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_file({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_file(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_file_batch(
- &self,
- entity_list: &Vec<models::FileEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send> {
+ fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box<Future<Item = CreateFileAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_file_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_file_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_file(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
+ fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_file(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_file_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
+ fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_file_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_file_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -576,65 +555,58 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
+ fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_file(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_file(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_fileset(&self, entity: models::FilesetEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
+ fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_fileset({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_fileset(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_fileset_batch(
- &self,
- entity_list: &Vec<models::FilesetEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send> {
+ fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box<Future<Item = CreateFilesetAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_fileset_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_fileset_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_fileset(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
+ fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_fileset(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_fileset_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
+ fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_fileset_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_fileset_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -685,76 +657,69 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_fileset(&self, ident: String, entity: models::FilesetEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send> {
+ fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_fileset(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_fileset(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
+ fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_release({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_release(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_release_batch(
- &self,
- entity_list: &Vec<models::ReleaseEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send> {
+ fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box<Future<Item = CreateReleaseAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_release_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_release_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_work(&self, entity: models::WorkEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
+ fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_work({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_work(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_release(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
+ fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_release(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_release_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
+ fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_release_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_release_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -874,65 +839,58 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
+ fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_release(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_release(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_webcapture(&self, entity: models::WebcaptureEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
+ fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_webcapture({:?}, \"{}\") - X-Span-ID: {:?}",
- entity,
+ "create_webcapture(\"{}\", {:?}) - X-Span-ID: {:?}",
editgroup_id,
+ entity,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_webcapture_batch(
- &self,
- entity_list: &Vec<models::WebcaptureEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send> {
+ fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box<Future<Item = CreateWebcaptureAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_webcapture_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_webcapture_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_webcapture(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
+ fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_webcapture(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_webcapture_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
+ fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_webcapture_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_webcapture_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -983,54 +941,47 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_webcapture(&self, ident: String, entity: models::WebcaptureEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send> {
+ fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_webcapture(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_webcapture(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn create_work_batch(
- &self,
- entity_list: &Vec<models::WorkEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send> {
+ fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box<Future<Item = CreateWorkAutoBatchResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "create_work_batch({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}",
- entity_list,
- autoaccept,
- editgroup_id,
- description,
- extra,
+ "create_work_auto_batch({:?}) - X-Span-ID: {:?}",
+ auto_batch,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_work(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
+ fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
"delete_work(\"{}\", \"{}\") - X-Span-ID: {:?}",
- ident,
editgroup_id,
+ ident,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_work_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
+ fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_work_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!(
+ "delete_work_edit(\"{}\", \"{}\") - X-Span-ID: {:?}",
+ editgroup_id,
+ edit_id,
+ context.x_span_id.unwrap_or(String::from("<none>")).clone()
+ );
Box::new(futures::failed("Generic failure".into()))
}
@@ -1092,13 +1043,13 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
+ fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
let context = context.clone();
println!(
- "update_work(\"{}\", {:?}, \"{}\") - X-Span-ID: {:?}",
+ "update_work(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}",
+ editgroup_id,
ident,
entity,
- editgroup_id,
context.x_span_id.unwrap_or(String::from("<none>")).clone()
);
Box::new(futures::failed("Generic failure".into()))
diff --git a/rust/fatcat-api-spec/src/client.rs b/rust/fatcat-api-spec/src/client.rs
index 057f1651..378c546f 100644
--- a/rust/fatcat-api-spec/src/client.rs
+++ b/rust/fatcat-api-spec/src/client.rs
@@ -35,9 +35,9 @@ use swagger::{ApiError, Context, XSpanId};
use models;
use {
- AcceptEditgroupResponse, Api, AuthCheckResponse, AuthOidcResponse, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse, CreateCreatorResponse,
- CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateFilesetBatchResponse, CreateFilesetResponse, CreateReleaseBatchResponse,
- CreateReleaseResponse, CreateWebcaptureBatchResponse, CreateWebcaptureResponse, CreateWorkBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, DeleteContainerResponse,
+ AcceptEditgroupResponse, Api, AuthCheckResponse, AuthOidcResponse, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse, CreateCreatorResponse,
+ CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse, CreateReleaseAutoBatchResponse,
+ CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, DeleteContainerResponse,
DeleteCreatorEditResponse, DeleteCreatorResponse, DeleteFileEditResponse, DeleteFileResponse, DeleteFilesetEditResponse, DeleteFilesetResponse, DeleteReleaseEditResponse, DeleteReleaseResponse,
DeleteWebcaptureEditResponse, DeleteWebcaptureResponse, DeleteWorkEditResponse, DeleteWorkResponse, GetChangelogEntryResponse, GetChangelogResponse, GetContainerEditResponse,
GetContainerHistoryResponse, GetContainerRedirectsResponse, GetContainerResponse, GetContainerRevisionResponse, GetCreatorEditResponse, GetCreatorHistoryResponse, GetCreatorRedirectsResponse,
@@ -173,14 +173,11 @@ impl Client {
}
impl Api for Client {
- fn create_container(&self, param_entity: models::ContainerEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn create_container(&self, param_editgroup_id: String, param_entity: models::ContainerEntity, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/container?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/container",
self.base_path,
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -267,31 +264,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_container_batch(
- &self,
- param_entity_list: &Vec<models::ContainerEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
-
- let url = format!(
- "{}/v0/container/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
+ fn create_container_auto_batch(&self, param_auto_batch: models::ContainerAutoBatch, context: &Context) -> Box<Future<Item = CreateContainerAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/container/batch", self.base_path);
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -299,27 +275,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_CONTAINER_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_CONTAINER_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateContainerBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateContainerAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateContainerBatchResponse::CreatedEntities(body))
+ Ok(CreateContainerAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateContainerBatchResponse::BadRequest(body))
+ Ok(CreateContainerAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -331,7 +307,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateContainerBatchResponse::NotAuthorized {
+ Ok(CreateContainerAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -341,21 +317,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateContainerBatchResponse::Forbidden(body))
+ Ok(CreateContainerAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateContainerBatchResponse::NotFound(body))
+ Ok(CreateContainerAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateContainerBatchResponse::GenericError(body))
+ Ok(CreateContainerAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -375,15 +351,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_container(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_container(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/container/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/container/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -465,10 +438,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_container_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
+ fn delete_container_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/container/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/container/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -975,19 +949,16 @@ impl Api for Client {
fn update_container(
&self,
+ param_editgroup_id: String,
param_ident: String,
param_entity: models::ContainerEntity,
- param_editgroup_id: String,
context: &Context,
) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
let url = format!(
- "{}/v0/container/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/container/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -1074,14 +1045,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_creator(&self, param_entity: models::CreatorEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn create_creator(&self, param_editgroup_id: String, param_entity: models::CreatorEntity, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/creator?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/creator",
self.base_path,
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -1168,31 +1136,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_creator_batch(
- &self,
- param_entity_list: &Vec<models::CreatorEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
-
- let url = format!(
- "{}/v0/creator/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
+ fn create_creator_auto_batch(&self, param_auto_batch: models::CreatorAutoBatch, context: &Context) -> Box<Future<Item = CreateCreatorAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/creator/batch", self.base_path);
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -1200,27 +1147,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_CREATOR_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_CREATOR_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateCreatorBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateCreatorAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateCreatorBatchResponse::CreatedEntities(body))
+ Ok(CreateCreatorAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateCreatorBatchResponse::BadRequest(body))
+ Ok(CreateCreatorAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -1232,7 +1179,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateCreatorBatchResponse::NotAuthorized {
+ Ok(CreateCreatorAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -1242,21 +1189,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateCreatorBatchResponse::Forbidden(body))
+ Ok(CreateCreatorAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateCreatorBatchResponse::NotFound(body))
+ Ok(CreateCreatorAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateCreatorBatchResponse::GenericError(body))
+ Ok(CreateCreatorAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -1276,15 +1223,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_creator(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_creator(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/creator/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/creator/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -1366,10 +1310,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_creator_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
+ fn delete_creator_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/creator/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/creator/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -1944,19 +1889,16 @@ impl Api for Client {
fn update_creator(
&self,
+ param_editgroup_id: String,
param_ident: String,
param_entity: models::CreatorEntity,
- param_editgroup_id: String,
context: &Context,
) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
let url = format!(
- "{}/v0/creator/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/creator/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -3281,11 +3223,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_file(&self, param_entity: models::FileEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
- let url = format!("{}/v0/file?{editgroup_id}", self.base_path, editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET));
+ fn create_file(&self, param_editgroup_id: String, param_entity: models::FileEntity, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
+ let url = format!(
+ "{}/v0/editgroup/{editgroup_id}/file",
+ self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
+ );
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -3371,31 +3314,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_file_batch(
- &self,
- param_entity_list: &Vec<models::FileEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
+ fn create_file_auto_batch(&self, param_auto_batch: models::FileAutoBatch, context: &Context) -> Box<Future<Item = CreateFileAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/file/batch", self.base_path);
- let url = format!(
- "{}/v0/file/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
-
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -3403,27 +3325,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_FILE_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_FILE_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateFileBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateFileAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateFileBatchResponse::CreatedEntities(body))
+ Ok(CreateFileAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateFileBatchResponse::BadRequest(body))
+ Ok(CreateFileAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -3435,7 +3357,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateFileBatchResponse::NotAuthorized {
+ Ok(CreateFileAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -3445,21 +3367,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateFileBatchResponse::Forbidden(body))
+ Ok(CreateFileAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateFileBatchResponse::NotFound(body))
+ Ok(CreateFileAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateFileBatchResponse::GenericError(body))
+ Ok(CreateFileAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -3479,15 +3401,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_file(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_file(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/file/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/file/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -3569,10 +3488,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_file_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
+ fn delete_file_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/file/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/file/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -4080,15 +4000,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn update_file(&self, param_ident: String, param_entity: models::FileEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn update_file(&self, param_editgroup_id: String, param_ident: String, param_entity: models::FileEntity, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/file/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/file/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -4175,14 +4092,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_fileset(&self, param_entity: models::FilesetEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn create_fileset(&self, param_editgroup_id: String, param_entity: models::FilesetEntity, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/fileset?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/fileset",
self.base_path,
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -4269,31 +4183,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_fileset_batch(
- &self,
- param_entity_list: &Vec<models::FilesetEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
+ fn create_fileset_auto_batch(&self, param_auto_batch: models::FilesetAutoBatch, context: &Context) -> Box<Future<Item = CreateFilesetAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/fileset/batch", self.base_path);
- let url = format!(
- "{}/v0/fileset/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
-
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -4301,27 +4194,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_FILESET_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_FILESET_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateFilesetBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateFilesetAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateFilesetBatchResponse::CreatedEntities(body))
+ Ok(CreateFilesetAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateFilesetBatchResponse::BadRequest(body))
+ Ok(CreateFilesetAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -4333,7 +4226,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateFilesetBatchResponse::NotAuthorized {
+ Ok(CreateFilesetAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -4343,21 +4236,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateFilesetBatchResponse::Forbidden(body))
+ Ok(CreateFilesetAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateFilesetBatchResponse::NotFound(body))
+ Ok(CreateFilesetAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateFilesetBatchResponse::GenericError(body))
+ Ok(CreateFilesetAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -4377,15 +4270,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_fileset(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_fileset(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/fileset/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/fileset/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -4467,10 +4357,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_fileset_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
+ fn delete_fileset_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/fileset/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/fileset/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -4897,19 +4788,16 @@ impl Api for Client {
fn update_fileset(
&self,
+ param_editgroup_id: String,
param_ident: String,
param_entity: models::FilesetEntity,
- param_editgroup_id: String,
context: &Context,
) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
let url = format!(
- "{}/v0/fileset/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/fileset/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -4996,14 +4884,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_release(&self, param_entity: models::ReleaseEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn create_release(&self, param_editgroup_id: String, param_entity: models::ReleaseEntity, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/release?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/release",
self.base_path,
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -5090,31 +4975,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_release_batch(
- &self,
- param_entity_list: &Vec<models::ReleaseEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
-
- let url = format!(
- "{}/v0/release/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
+ fn create_release_auto_batch(&self, param_auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box<Future<Item = CreateReleaseAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/release/batch", self.base_path);
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -5122,27 +4986,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_RELEASE_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_RELEASE_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateReleaseBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateReleaseAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateReleaseBatchResponse::CreatedEntities(body))
+ Ok(CreateReleaseAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateReleaseBatchResponse::BadRequest(body))
+ Ok(CreateReleaseAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -5154,7 +5018,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateReleaseBatchResponse::NotAuthorized {
+ Ok(CreateReleaseAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -5164,21 +5028,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateReleaseBatchResponse::Forbidden(body))
+ Ok(CreateReleaseAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateReleaseBatchResponse::NotFound(body))
+ Ok(CreateReleaseAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateReleaseBatchResponse::GenericError(body))
+ Ok(CreateReleaseAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -5198,11 +5062,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_work(&self, param_entity: models::WorkEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
- let url = format!("{}/v0/work?{editgroup_id}", self.base_path, editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET));
+ fn create_work(&self, param_editgroup_id: String, param_entity: models::WorkEntity, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
+ let url = format!(
+ "{}/v0/editgroup/{editgroup_id}/work",
+ self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
+ );
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -5288,15 +5153,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_release(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_release(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/release/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/release/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -5378,10 +5240,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_release_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
+ fn delete_release_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/release/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/release/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -6116,19 +5979,16 @@ impl Api for Client {
fn update_release(
&self,
+ param_editgroup_id: String,
param_ident: String,
param_entity: models::ReleaseEntity,
- param_editgroup_id: String,
context: &Context,
) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
let url = format!(
- "{}/v0/release/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/release/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -6215,14 +6075,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_webcapture(&self, param_entity: models::WebcaptureEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn create_webcapture(&self, param_editgroup_id: String, param_entity: models::WebcaptureEntity, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/webcapture?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/webcapture",
self.base_path,
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -6309,31 +6166,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_webcapture_batch(
- &self,
- param_entity_list: &Vec<models::WebcaptureEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
+ fn create_webcapture_auto_batch(&self, param_auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box<Future<Item = CreateWebcaptureAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/webcapture/batch", self.base_path);
- let url = format!(
- "{}/v0/webcapture/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
-
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -6341,27 +6177,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_WEBCAPTURE_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_WEBCAPTURE_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateWebcaptureBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateWebcaptureAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateWebcaptureBatchResponse::CreatedEntities(body))
+ Ok(CreateWebcaptureAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateWebcaptureBatchResponse::BadRequest(body))
+ Ok(CreateWebcaptureAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -6373,7 +6209,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateWebcaptureBatchResponse::NotAuthorized {
+ Ok(CreateWebcaptureAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -6383,21 +6219,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateWebcaptureBatchResponse::Forbidden(body))
+ Ok(CreateWebcaptureAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateWebcaptureBatchResponse::NotFound(body))
+ Ok(CreateWebcaptureAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateWebcaptureBatchResponse::GenericError(body))
+ Ok(CreateWebcaptureAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -6417,15 +6253,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_webcapture(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_webcapture(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/webcapture/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/webcapture/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -6507,10 +6340,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_webcapture_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
+ fn delete_webcapture_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/webcapture/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/webcapture/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -6937,19 +6771,16 @@ impl Api for Client {
fn update_webcapture(
&self,
+ param_editgroup_id: String,
param_ident: String,
param_entity: models::WebcaptureEntity,
- param_editgroup_id: String,
context: &Context,
) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
let url = format!(
- "{}/v0/webcapture/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/webcapture/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
@@ -7036,31 +6867,10 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn create_work_batch(
- &self,
- param_entity_list: &Vec<models::WorkEntity>,
- param_autoaccept: Option<bool>,
- param_editgroup_id: Option<String>,
- param_description: Option<String>,
- param_extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string()));
- let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string()));
- let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string()));
- let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string()));
+ fn create_work_auto_batch(&self, param_auto_batch: models::WorkAutoBatch, context: &Context) -> Box<Future<Item = CreateWorkAutoBatchResponse, Error = ApiError> + Send> {
+ let url = format!("{}/v0/editgroup/auto/work/batch", self.base_path);
- let url = format!(
- "{}/v0/work/batch?{autoaccept}{editgroup_id}{description}{extra}",
- self.base_path,
- autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET),
- description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET),
- extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET)
- );
-
- let body = serde_json::to_string(&param_entity_list).expect("impossible to fail to serialize");
+ let body = serde_json::to_string(&param_auto_batch).expect("impossible to fail to serialize");
let hyper_client = (self.hyper_client)();
let request = hyper_client.request(hyper::method::Method::Post, &url);
@@ -7068,27 +6878,27 @@ impl Api for Client {
let request = request.body(&body);
- custom_headers.set(ContentType(mimetypes::requests::CREATE_WORK_BATCH.clone()));
+ custom_headers.set(ContentType(mimetypes::requests::CREATE_WORK_AUTO_BATCH.clone()));
context.x_span_id.as_ref().map(|header| custom_headers.set(XSpanId(header.clone())));
let request = request.headers(custom_headers);
// Helper function to provide a code block to use `?` in (to be replaced by the `catch` block when it exists).
- fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateWorkBatchResponse, ApiError> {
+ fn parse_response(mut response: hyper::client::response::Response) -> Result<CreateWorkAutoBatchResponse, ApiError> {
match response.status.to_u16() {
201 => {
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::<Vec<models::EntityEdit>>(&buf)?;
+ let body = serde_json::from_str::<models::Editgroup>(&buf)?;
- Ok(CreateWorkBatchResponse::CreatedEntities(body))
+ Ok(CreateWorkAutoBatchResponse::CreatedEditgroup(body))
}
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::ErrorResponse>(&buf)?;
- Ok(CreateWorkBatchResponse::BadRequest(body))
+ Ok(CreateWorkAutoBatchResponse::BadRequest(body))
}
401 => {
let mut buf = String::new();
@@ -7100,7 +6910,7 @@ impl Api for Client {
.get::<ResponseWwwAuthenticate>()
.ok_or_else(|| "Required response header WWW_Authenticate for response 401 was not found.")?;
- Ok(CreateWorkBatchResponse::NotAuthorized {
+ Ok(CreateWorkAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate.0.clone(),
})
@@ -7110,21 +6920,21 @@ impl Api for Client {
response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
let body = serde_json::from_str::<models::ErrorResponse>(&buf)?;
- Ok(CreateWorkBatchResponse::Forbidden(body))
+ Ok(CreateWorkAutoBatchResponse::Forbidden(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::ErrorResponse>(&buf)?;
- Ok(CreateWorkBatchResponse::NotFound(body))
+ Ok(CreateWorkAutoBatchResponse::NotFound(body))
}
500 => {
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::ErrorResponse>(&buf)?;
- Ok(CreateWorkBatchResponse::GenericError(body))
+ Ok(CreateWorkAutoBatchResponse::GenericError(body))
}
code => {
let mut buf = [0; 100];
@@ -7144,15 +6954,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_work(&self, param_ident: String, param_editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn delete_work(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/work/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/work/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let hyper_client = (self.hyper_client)();
@@ -7234,10 +7041,11 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn delete_work_edit(&self, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
+ fn delete_work_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/work/edit/{edit_id}",
+ "{}/v0/editgroup/{editgroup_id}/work/edit/{edit_id}",
self.base_path,
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
edit_id = utf8_percent_encode(&param_edit_id.to_string(), PATH_SEGMENT_ENCODE_SET)
);
@@ -7730,15 +7538,12 @@ impl Api for Client {
Box::new(futures::done(result))
}
- fn update_work(&self, param_ident: String, param_entity: models::WorkEntity, param_editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
- // Query parameters
- let query_editgroup_id = format!("editgroup_id={editgroup_id}&", editgroup_id = param_editgroup_id.to_string());
-
+ fn update_work(&self, param_editgroup_id: String, param_ident: String, param_entity: models::WorkEntity, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
let url = format!(
- "{}/v0/work/{ident}?{editgroup_id}",
+ "{}/v0/editgroup/{editgroup_id}/work/{ident}",
self.base_path,
- ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET),
- editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)
+ editgroup_id = utf8_percent_encode(&param_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET),
+ ident = utf8_percent_encode(&param_ident.to_string(), PATH_SEGMENT_ENCODE_SET)
);
let body = serde_json::to_string(&param_entity).expect("impossible to fail to serialize");
diff --git a/rust/fatcat-api-spec/src/lib.rs b/rust/fatcat-api-spec/src/lib.rs
index e01c4fd8..b19b5793 100644
--- a/rust/fatcat-api-spec/src/lib.rs
+++ b/rust/fatcat-api-spec/src/lib.rs
@@ -49,9 +49,9 @@ pub enum CreateContainerResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateContainerBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateContainerAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -201,9 +201,9 @@ pub enum CreateCreatorResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateCreatorBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateCreatorAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -581,9 +581,9 @@ pub enum CreateFileResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateFileBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateFileAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -733,9 +733,9 @@ pub enum CreateFilesetResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateFilesetBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateFilesetAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -873,9 +873,9 @@ pub enum CreateReleaseResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateReleaseBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateReleaseAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -1077,9 +1077,9 @@ pub enum CreateWebcaptureResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateWebcaptureBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateWebcaptureAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -1201,9 +1201,9 @@ pub enum UpdateWebcaptureResponse {
}
#[derive(Debug, PartialEq)]
-pub enum CreateWorkBatchResponse {
- /// Created Entities
- CreatedEntities(Vec<models::EntityEdit>),
+pub enum CreateWorkAutoBatchResponse {
+ /// Created Editgroup
+ CreatedEditgroup(models::Editgroup),
/// Bad Request
BadRequest(models::ErrorResponse),
/// Not Authorized
@@ -1338,21 +1338,13 @@ pub enum UpdateWorkResponse {
/// API
pub trait Api {
- fn create_container(&self, entity: models::ContainerEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send>;
+ fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send>;
- fn create_container_batch(
- &self,
- entity_list: &Vec<models::ContainerEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send>;
+ fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box<Future<Item = CreateContainerAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_container(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
+ fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
- fn delete_container_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
+ fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
fn get_container(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send>;
@@ -1373,23 +1365,15 @@ pub trait Api {
context: &Context,
) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
- fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
+ fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
- fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send>;
+ fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send>;
- fn create_creator_batch(
- &self,
- entity_list: &Vec<models::CreatorEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send>;
+ fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box<Future<Item = CreateCreatorAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_creator(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
+ fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
- fn delete_creator_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
+ fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
fn get_creator(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send>;
@@ -1412,7 +1396,7 @@ pub trait Api {
context: &Context,
) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
- fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
+ fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
fn auth_check(&self, role: Option<String>, context: &Context) -> Box<Future<Item = AuthCheckResponse, Error = ApiError> + Send>;
@@ -1470,21 +1454,13 @@ pub trait Api {
context: &Context,
) -> Box<Future<Item = GetEditorAnnotationsResponse, Error = ApiError> + Send>;
- fn create_file(&self, entity: models::FileEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send>;
+ fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send>;
- fn create_file_batch(
- &self,
- entity_list: &Vec<models::FileEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send>;
+ fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box<Future<Item = CreateFileAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_file(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
+ fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
- fn delete_file_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
+ fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
fn get_file(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send>;
@@ -1506,23 +1482,15 @@ pub trait Api {
context: &Context,
) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
- fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
+ fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
- fn create_fileset(&self, entity: models::FilesetEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send>;
+ fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send>;
- fn create_fileset_batch(
- &self,
- entity_list: &Vec<models::FilesetEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send>;
+ fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box<Future<Item = CreateFilesetAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_fileset(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send>;
+ fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send>;
- fn delete_fileset_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send>;
+ fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send>;
fn get_fileset(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetFilesetResponse, Error = ApiError> + Send>;
@@ -1534,25 +1502,17 @@ pub trait Api {
fn get_fileset_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetFilesetRevisionResponse, Error = ApiError> + Send>;
- fn update_fileset(&self, ident: String, entity: models::FilesetEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send>;
+ fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send>;
- fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send>;
+ fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send>;
- fn create_release_batch(
- &self,
- entity_list: &Vec<models::ReleaseEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send>;
+ fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box<Future<Item = CreateReleaseAutoBatchResponse, Error = ApiError> + Send>;
- fn create_work(&self, entity: models::WorkEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send>;
+ fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send>;
- fn delete_release(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
+ fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
- fn delete_release_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
+ fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
fn get_release(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send>;
@@ -1587,23 +1547,15 @@ pub trait Api {
context: &Context,
) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
- fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
+ fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
- fn create_webcapture(&self, entity: models::WebcaptureEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send>;
+ fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send>;
- fn create_webcapture_batch(
- &self,
- entity_list: &Vec<models::WebcaptureEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send>;
+ fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box<Future<Item = CreateWebcaptureAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_webcapture(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send>;
+ fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send>;
- fn delete_webcapture_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send>;
+ fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send>;
fn get_webcapture(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWebcaptureResponse, Error = ApiError> + Send>;
@@ -1615,21 +1567,13 @@ pub trait Api {
fn get_webcapture_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWebcaptureRevisionResponse, Error = ApiError> + Send>;
- fn update_webcapture(&self, ident: String, entity: models::WebcaptureEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send>;
+ fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send>;
- fn create_work_batch(
- &self,
- entity_list: &Vec<models::WorkEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- context: &Context,
- ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send>;
+ fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box<Future<Item = CreateWorkAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_work(&self, ident: String, editgroup_id: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
+ fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
- fn delete_work_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
+ fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
fn get_work(&self, ident: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send>;
@@ -1643,25 +1587,18 @@ pub trait Api {
fn get_work_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWorkRevisionResponse, Error = ApiError> + Send>;
- fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: String, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
+ fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
}
/// API without a `Context`
pub trait ApiNoContext {
- fn create_container(&self, entity: models::ContainerEntity, editgroup_id: String) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send>;
+ fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send>;
- fn create_container_batch(
- &self,
- entity_list: &Vec<models::ContainerEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send>;
+ fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch) -> Box<Future<Item = CreateContainerAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_container(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
+ fn delete_container(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
- fn delete_container_edit(&self, edit_id: String) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
+ fn delete_container_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
fn get_container(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send>;
@@ -1681,22 +1618,15 @@ pub trait ApiNoContext {
hide: Option<String>,
) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
- fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: String) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
+ fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
- fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: String) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send>;
+ fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send>;
- fn create_creator_batch(
- &self,
- entity_list: &Vec<models::CreatorEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send>;
+ fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch) -> Box<Future<Item = CreateCreatorAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_creator(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
+ fn delete_creator(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
- fn delete_creator_edit(&self, edit_id: String) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
+ fn delete_creator_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
fn get_creator(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send>;
@@ -1712,7 +1642,7 @@ pub trait ApiNoContext {
fn lookup_creator(&self, orcid: Option<String>, wikidata_qid: Option<String>, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
- fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: String) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
+ fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
fn auth_check(&self, role: Option<String>) -> Box<Future<Item = AuthCheckResponse, Error = ApiError> + Send>;
@@ -1762,20 +1692,13 @@ pub trait ApiNoContext {
since: Option<chrono::DateTime<chrono::Utc>>,
) -> Box<Future<Item = GetEditorAnnotationsResponse, Error = ApiError> + Send>;
- fn create_file(&self, entity: models::FileEntity, editgroup_id: String) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send>;
+ fn create_file(&self, editgroup_id: String, entity: models::FileEntity) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send>;
- fn create_file_batch(
- &self,
- entity_list: &Vec<models::FileEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send>;
+ fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch) -> Box<Future<Item = CreateFileAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_file(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
+ fn delete_file(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
- fn delete_file_edit(&self, edit_id: String) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
+ fn delete_file_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
fn get_file(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send>;
@@ -1796,22 +1719,15 @@ pub trait ApiNoContext {
hide: Option<String>,
) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
- fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: String) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
+ fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
- fn create_fileset(&self, entity: models::FilesetEntity, editgroup_id: String) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send>;
+ fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send>;
- fn create_fileset_batch(
- &self,
- entity_list: &Vec<models::FilesetEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send>;
+ fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch) -> Box<Future<Item = CreateFilesetAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_fileset(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send>;
+ fn delete_fileset(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send>;
- fn delete_fileset_edit(&self, edit_id: String) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send>;
+ fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send>;
fn get_fileset(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFilesetResponse, Error = ApiError> + Send>;
@@ -1823,24 +1739,17 @@ pub trait ApiNoContext {
fn get_fileset_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFilesetRevisionResponse, Error = ApiError> + Send>;
- fn update_fileset(&self, ident: String, entity: models::FilesetEntity, editgroup_id: String) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send>;
+ fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send>;
- fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: String) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send>;
+ fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send>;
- fn create_release_batch(
- &self,
- entity_list: &Vec<models::ReleaseEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send>;
+ fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch) -> Box<Future<Item = CreateReleaseAutoBatchResponse, Error = ApiError> + Send>;
- fn create_work(&self, entity: models::WorkEntity, editgroup_id: String) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send>;
+ fn create_work(&self, editgroup_id: String, entity: models::WorkEntity) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send>;
- fn delete_release(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
+ fn delete_release(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
- fn delete_release_edit(&self, edit_id: String) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
+ fn delete_release_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
fn get_release(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send>;
@@ -1874,22 +1783,15 @@ pub trait ApiNoContext {
hide: Option<String>,
) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
- fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: String) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
+ fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
- fn create_webcapture(&self, entity: models::WebcaptureEntity, editgroup_id: String) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send>;
+ fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send>;
- fn create_webcapture_batch(
- &self,
- entity_list: &Vec<models::WebcaptureEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send>;
+ fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch) -> Box<Future<Item = CreateWebcaptureAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_webcapture(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send>;
+ fn delete_webcapture(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send>;
- fn delete_webcapture_edit(&self, edit_id: String) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send>;
+ fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send>;
fn get_webcapture(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWebcaptureResponse, Error = ApiError> + Send>;
@@ -1901,20 +1803,13 @@ pub trait ApiNoContext {
fn get_webcapture_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWebcaptureRevisionResponse, Error = ApiError> + Send>;
- fn update_webcapture(&self, ident: String, entity: models::WebcaptureEntity, editgroup_id: String) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send>;
+ fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send>;
- fn create_work_batch(
- &self,
- entity_list: &Vec<models::WorkEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send>;
+ fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch) -> Box<Future<Item = CreateWorkAutoBatchResponse, Error = ApiError> + Send>;
- fn delete_work(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
+ fn delete_work(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
- fn delete_work_edit(&self, edit_id: String) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
+ fn delete_work_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
fn get_work(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send>;
@@ -1928,7 +1823,7 @@ pub trait ApiNoContext {
fn get_work_revision(&self, rev_id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkRevisionResponse, Error = ApiError> + Send>;
- fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: String) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
+ fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
}
/// Trait to extend an API to make it easy to bind it to a context.
@@ -1947,27 +1842,20 @@ impl<'a, T: Api + Sized> ContextWrapperExt<'a> for T {
}
impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
- fn create_container(&self, entity: models::ContainerEntity, editgroup_id: String) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
- self.api().create_container(entity, editgroup_id, &self.context())
+ fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity) -> Box<Future<Item = CreateContainerResponse, Error = ApiError> + Send> {
+ self.api().create_container(editgroup_id, entity, &self.context())
}
- fn create_container_batch(
- &self,
- entity_list: &Vec<models::ContainerEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send> {
- self.api().create_container_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch) -> Box<Future<Item = CreateContainerAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_container_auto_batch(auto_batch, &self.context())
}
- fn delete_container(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
- self.api().delete_container(ident, editgroup_id, &self.context())
+ fn delete_container(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send> {
+ self.api().delete_container(editgroup_id, ident, &self.context())
}
- fn delete_container_edit(&self, edit_id: String) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
- self.api().delete_container_edit(edit_id, &self.context())
+ fn delete_container_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
+ self.api().delete_container_edit(editgroup_id, edit_id, &self.context())
}
fn get_container(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send> {
@@ -2000,31 +1888,24 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().lookup_container(issnl, wikidata_qid, expand, hide, &self.context())
}
- fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: String) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
- self.api().update_container(ident, entity, editgroup_id, &self.context())
+ fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
+ self.api().update_container(editgroup_id, ident, entity, &self.context())
}
- fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: String) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
- self.api().create_creator(entity, editgroup_id, &self.context())
+ fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity) -> Box<Future<Item = CreateCreatorResponse, Error = ApiError> + Send> {
+ self.api().create_creator(editgroup_id, entity, &self.context())
}
- fn create_creator_batch(
- &self,
- entity_list: &Vec<models::CreatorEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send> {
- self.api().create_creator_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch) -> Box<Future<Item = CreateCreatorAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_creator_auto_batch(auto_batch, &self.context())
}
- fn delete_creator(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
- self.api().delete_creator(ident, editgroup_id, &self.context())
+ fn delete_creator(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send> {
+ self.api().delete_creator(editgroup_id, ident, &self.context())
}
- fn delete_creator_edit(&self, edit_id: String) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
- self.api().delete_creator_edit(edit_id, &self.context())
+ fn delete_creator_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
+ self.api().delete_creator_edit(editgroup_id, edit_id, &self.context())
}
fn get_creator(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send> {
@@ -2055,8 +1936,8 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().lookup_creator(orcid, wikidata_qid, expand, hide, &self.context())
}
- fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: String) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
- self.api().update_creator(ident, entity, editgroup_id, &self.context())
+ fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
+ self.api().update_creator(editgroup_id, ident, entity, &self.context())
}
fn auth_check(&self, role: Option<String>) -> Box<Future<Item = AuthCheckResponse, Error = ApiError> + Send> {
@@ -2137,27 +2018,20 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().get_editor_annotations(editor_id, limit, before, since, &self.context())
}
- fn create_file(&self, entity: models::FileEntity, editgroup_id: String) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
- self.api().create_file(entity, editgroup_id, &self.context())
+ fn create_file(&self, editgroup_id: String, entity: models::FileEntity) -> Box<Future<Item = CreateFileResponse, Error = ApiError> + Send> {
+ self.api().create_file(editgroup_id, entity, &self.context())
}
- fn create_file_batch(
- &self,
- entity_list: &Vec<models::FileEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send> {
- self.api().create_file_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch) -> Box<Future<Item = CreateFileAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_file_auto_batch(auto_batch, &self.context())
}
- fn delete_file(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
- self.api().delete_file(ident, editgroup_id, &self.context())
+ fn delete_file(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send> {
+ self.api().delete_file(editgroup_id, ident, &self.context())
}
- fn delete_file_edit(&self, edit_id: String) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
- self.api().delete_file_edit(edit_id, &self.context())
+ fn delete_file_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
+ self.api().delete_file_edit(editgroup_id, edit_id, &self.context())
}
fn get_file(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send> {
@@ -2191,31 +2065,24 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().lookup_file(md5, sha1, sha256, expand, hide, &self.context())
}
- fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: String) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
- self.api().update_file(ident, entity, editgroup_id, &self.context())
+ fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
+ self.api().update_file(editgroup_id, ident, entity, &self.context())
}
- fn create_fileset(&self, entity: models::FilesetEntity, editgroup_id: String) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
- self.api().create_fileset(entity, editgroup_id, &self.context())
+ fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity) -> Box<Future<Item = CreateFilesetResponse, Error = ApiError> + Send> {
+ self.api().create_fileset(editgroup_id, entity, &self.context())
}
- fn create_fileset_batch(
- &self,
- entity_list: &Vec<models::FilesetEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send> {
- self.api().create_fileset_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch) -> Box<Future<Item = CreateFilesetAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_fileset_auto_batch(auto_batch, &self.context())
}
- fn delete_fileset(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
- self.api().delete_fileset(ident, editgroup_id, &self.context())
+ fn delete_fileset(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteFilesetResponse, Error = ApiError> + Send> {
+ self.api().delete_fileset(editgroup_id, ident, &self.context())
}
- fn delete_fileset_edit(&self, edit_id: String) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
- self.api().delete_fileset_edit(edit_id, &self.context())
+ fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
+ self.api().delete_fileset_edit(editgroup_id, edit_id, &self.context())
}
fn get_fileset(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFilesetResponse, Error = ApiError> + Send> {
@@ -2238,35 +2105,28 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().get_fileset_revision(rev_id, expand, hide, &self.context())
}
- fn update_fileset(&self, ident: String, entity: models::FilesetEntity, editgroup_id: String) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send> {
- self.api().update_fileset(ident, entity, editgroup_id, &self.context())
+ fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity) -> Box<Future<Item = UpdateFilesetResponse, Error = ApiError> + Send> {
+ self.api().update_fileset(editgroup_id, ident, entity, &self.context())
}
- fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: String) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
- self.api().create_release(entity, editgroup_id, &self.context())
+ fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity) -> Box<Future<Item = CreateReleaseResponse, Error = ApiError> + Send> {
+ self.api().create_release(editgroup_id, entity, &self.context())
}
- fn create_release_batch(
- &self,
- entity_list: &Vec<models::ReleaseEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send> {
- self.api().create_release_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch) -> Box<Future<Item = CreateReleaseAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_release_auto_batch(auto_batch, &self.context())
}
- fn create_work(&self, entity: models::WorkEntity, editgroup_id: String) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
- self.api().create_work(entity, editgroup_id, &self.context())
+ fn create_work(&self, editgroup_id: String, entity: models::WorkEntity) -> Box<Future<Item = CreateWorkResponse, Error = ApiError> + Send> {
+ self.api().create_work(editgroup_id, entity, &self.context())
}
- fn delete_release(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
- self.api().delete_release(ident, editgroup_id, &self.context())
+ fn delete_release(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send> {
+ self.api().delete_release(editgroup_id, ident, &self.context())
}
- fn delete_release_edit(&self, edit_id: String) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
- self.api().delete_release_edit(edit_id, &self.context())
+ fn delete_release_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
+ self.api().delete_release_edit(editgroup_id, edit_id, &self.context())
}
fn get_release(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send> {
@@ -2320,31 +2180,24 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
.lookup_release(doi, wikidata_qid, isbn13, pmid, pmcid, core, arxiv, jstor, ark, mag, expand, hide, &self.context())
}
- fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: String) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
- self.api().update_release(ident, entity, editgroup_id, &self.context())
+ fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
+ self.api().update_release(editgroup_id, ident, entity, &self.context())
}
- fn create_webcapture(&self, entity: models::WebcaptureEntity, editgroup_id: String) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
- self.api().create_webcapture(entity, editgroup_id, &self.context())
+ fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity) -> Box<Future<Item = CreateWebcaptureResponse, Error = ApiError> + Send> {
+ self.api().create_webcapture(editgroup_id, entity, &self.context())
}
- fn create_webcapture_batch(
- &self,
- entity_list: &Vec<models::WebcaptureEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send> {
- self.api().create_webcapture_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch) -> Box<Future<Item = CreateWebcaptureAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_webcapture_auto_batch(auto_batch, &self.context())
}
- fn delete_webcapture(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
- self.api().delete_webcapture(ident, editgroup_id, &self.context())
+ fn delete_webcapture(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteWebcaptureResponse, Error = ApiError> + Send> {
+ self.api().delete_webcapture(editgroup_id, ident, &self.context())
}
- fn delete_webcapture_edit(&self, edit_id: String) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
- self.api().delete_webcapture_edit(edit_id, &self.context())
+ fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
+ self.api().delete_webcapture_edit(editgroup_id, edit_id, &self.context())
}
fn get_webcapture(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWebcaptureResponse, Error = ApiError> + Send> {
@@ -2367,27 +2220,20 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().get_webcapture_revision(rev_id, expand, hide, &self.context())
}
- fn update_webcapture(&self, ident: String, entity: models::WebcaptureEntity, editgroup_id: String) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send> {
- self.api().update_webcapture(ident, entity, editgroup_id, &self.context())
+ fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity) -> Box<Future<Item = UpdateWebcaptureResponse, Error = ApiError> + Send> {
+ self.api().update_webcapture(editgroup_id, ident, entity, &self.context())
}
- fn create_work_batch(
- &self,
- entity_list: &Vec<models::WorkEntity>,
- autoaccept: Option<bool>,
- editgroup_id: Option<String>,
- description: Option<String>,
- extra: Option<String>,
- ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send> {
- self.api().create_work_batch(entity_list, autoaccept, editgroup_id, description, extra, &self.context())
+ fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch) -> Box<Future<Item = CreateWorkAutoBatchResponse, Error = ApiError> + Send> {
+ self.api().create_work_auto_batch(auto_batch, &self.context())
}
- fn delete_work(&self, ident: String, editgroup_id: String) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
- self.api().delete_work(ident, editgroup_id, &self.context())
+ fn delete_work(&self, editgroup_id: String, ident: String) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send> {
+ self.api().delete_work(editgroup_id, ident, &self.context())
}
- fn delete_work_edit(&self, edit_id: String) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
- self.api().delete_work_edit(edit_id, &self.context())
+ fn delete_work_edit(&self, editgroup_id: String, edit_id: String) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
+ self.api().delete_work_edit(editgroup_id, edit_id, &self.context())
}
fn get_work(&self, ident: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send> {
@@ -2414,8 +2260,8 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().get_work_revision(rev_id, expand, hide, &self.context())
}
- fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: String) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
- self.api().update_work(ident, entity, editgroup_id, &self.context())
+ fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
+ self.api().update_work(editgroup_id, ident, entity, &self.context())
}
}
diff --git a/rust/fatcat-api-spec/src/mimetypes.rs b/rust/fatcat-api-spec/src/mimetypes.rs
index 5c916e47..0676f63b 100644
--- a/rust/fatcat-api-spec/src/mimetypes.rs
+++ b/rust/fatcat-api-spec/src/mimetypes.rs
@@ -28,29 +28,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_CONTAINER_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateContainerBatch
+ /// Create Mime objects for the response content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteContainer
lazy_static! {
@@ -244,29 +244,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_CREATOR_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateCreatorBatch
+ /// Create Mime objects for the response content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteCreator
lazy_static! {
@@ -788,29 +788,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_FILE_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFileBatch
+ /// Create Mime objects for the response content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteFile
lazy_static! {
@@ -1004,29 +1004,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_FILESET_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateFilesetBatch
+ /// Create Mime objects for the response content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteFileset
lazy_static! {
@@ -1204,29 +1204,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_RELEASE_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateReleaseBatch
+ /// Create Mime objects for the response content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for CreateWork
lazy_static! {
@@ -1492,29 +1492,29 @@ pub mod responses {
lazy_static! {
pub static ref CREATE_WEBCAPTURE_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWebcaptureBatch
+ /// Create Mime objects for the response content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteWebcapture
lazy_static! {
@@ -1668,29 +1668,29 @@ pub mod responses {
lazy_static! {
pub static ref UPDATE_WEBCAPTURE_GENERIC_ERROR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_CREATED_ENTITIES: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_CREATED_EDITGROUP: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_BAD_REQUEST: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_NOT_AUTHORIZED: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_FORBIDDEN: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_NOT_FOUND: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the response content types for CreateWorkBatch
+ /// Create Mime objects for the response content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH_GENERIC_ERROR: Mime = mime!(Application / Json);
}
/// Create Mime objects for the response content types for DeleteWork
lazy_static! {
@@ -1869,9 +1869,9 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_CONTAINER: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateContainerBatch
+ /// Create Mime objects for the request content types for CreateContainerAutoBatch
lazy_static! {
- pub static ref CREATE_CONTAINER_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_CONTAINER_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateContainer
lazy_static! {
@@ -1881,9 +1881,9 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_CREATOR: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateCreatorBatch
+ /// Create Mime objects for the request content types for CreateCreatorAutoBatch
lazy_static! {
- pub static ref CREATE_CREATOR_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_CREATOR_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateCreator
lazy_static! {
@@ -1913,9 +1913,9 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_FILE: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateFileBatch
+ /// Create Mime objects for the request content types for CreateFileAutoBatch
lazy_static! {
- pub static ref CREATE_FILE_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILE_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateFile
lazy_static! {
@@ -1925,9 +1925,9 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_FILESET: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateFilesetBatch
+ /// Create Mime objects for the request content types for CreateFilesetAutoBatch
lazy_static! {
- pub static ref CREATE_FILESET_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_FILESET_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateFileset
lazy_static! {
@@ -1937,9 +1937,9 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_RELEASE: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateReleaseBatch
+ /// Create Mime objects for the request content types for CreateReleaseAutoBatch
lazy_static! {
- pub static ref CREATE_RELEASE_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_RELEASE_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for CreateWork
lazy_static! {
@@ -1953,17 +1953,17 @@ pub mod requests {
lazy_static! {
pub static ref CREATE_WEBCAPTURE: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateWebcaptureBatch
+ /// Create Mime objects for the request content types for CreateWebcaptureAutoBatch
lazy_static! {
- pub static ref CREATE_WEBCAPTURE_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_WEBCAPTURE_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateWebcapture
lazy_static! {
pub static ref UPDATE_WEBCAPTURE: Mime = mime!(Application / Json);
}
- /// Create Mime objects for the request content types for CreateWorkBatch
+ /// Create Mime objects for the request content types for CreateWorkAutoBatch
lazy_static! {
- pub static ref CREATE_WORK_BATCH: Mime = mime!(Application / Json);
+ pub static ref CREATE_WORK_AUTO_BATCH: Mime = mime!(Application / Json);
}
/// Create Mime objects for the request content types for UpdateWork
lazy_static! {
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 41b9f95e..ce559ccc 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -78,6 +78,24 @@ impl ChangelogEntry {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct ContainerAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::ContainerEntity>,
+}
+
+impl ContainerAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::ContainerEntity>) -> ContainerAutoBatch {
+ ContainerAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ContainerEntity {
#[serde(rename = "wikidata_qid")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -149,6 +167,24 @@ impl ContainerEntity {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct CreatorAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::CreatorEntity>,
+}
+
+impl CreatorAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::CreatorEntity>) -> CreatorAutoBatch {
+ CreatorAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreatorEntity {
#[serde(rename = "wikidata_qid")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -496,6 +532,24 @@ impl ErrorResponse {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct FileAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::FileEntity>,
+}
+
+impl FileAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::FileEntity>) -> FileAutoBatch {
+ FileAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileEntity {
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -590,6 +644,24 @@ impl FileUrl {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct FilesetAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::FilesetEntity>,
+}
+
+impl FilesetAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::FilesetEntity>) -> FilesetAutoBatch {
+ FilesetAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FilesetEntity {
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -732,6 +804,24 @@ impl ReleaseAbstract {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct ReleaseAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::ReleaseEntity>,
+}
+
+impl ReleaseAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::ReleaseEntity>) -> ReleaseAutoBatch {
+ ReleaseAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReleaseContrib {
#[serde(rename = "index")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -1108,6 +1198,24 @@ impl Success {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct WebcaptureAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::WebcaptureEntity>,
+}
+
+impl WebcaptureAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::WebcaptureEntity>) -> WebcaptureAutoBatch {
+ WebcaptureAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebcaptureCdxLine {
#[serde(rename = "surt")]
pub surt: String,
@@ -1240,6 +1348,24 @@ impl WebcaptureUrl {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct WorkAutoBatch {
+ #[serde(rename = "editgroup")]
+ pub editgroup: models::Editgroup,
+
+ #[serde(rename = "entity_list")]
+ pub entity_list: Vec<models::WorkEntity>,
+}
+
+impl WorkAutoBatch {
+ pub fn new(editgroup: models::Editgroup, entity_list: Vec<models::WorkEntity>) -> WorkAutoBatch {
+ WorkAutoBatch {
+ editgroup: editgroup,
+ entity_list: entity_list,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WorkEntity {
#[serde(rename = "edit_extra")]
#[serde(skip_serializing_if = "Option::is_none")]
diff --git a/rust/fatcat-api-spec/src/server.rs b/rust/fatcat-api-spec/src/server.rs
index ffe3347b..102b6e41 100644
--- a/rust/fatcat-api-spec/src/server.rs
+++ b/rust/fatcat-api-spec/src/server.rs
@@ -37,9 +37,9 @@ use swagger::{ApiError, Context, XSpanId};
#[allow(unused_imports)]
use models;
use {
- AcceptEditgroupResponse, Api, AuthCheckResponse, AuthOidcResponse, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse, CreateCreatorResponse,
- CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateFilesetBatchResponse, CreateFilesetResponse, CreateReleaseBatchResponse,
- CreateReleaseResponse, CreateWebcaptureBatchResponse, CreateWebcaptureResponse, CreateWorkBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, DeleteContainerResponse,
+ AcceptEditgroupResponse, Api, AuthCheckResponse, AuthOidcResponse, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse, CreateCreatorResponse,
+ CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse, CreateReleaseAutoBatchResponse,
+ CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, DeleteContainerResponse,
DeleteCreatorEditResponse, DeleteCreatorResponse, DeleteFileEditResponse, DeleteFileResponse, DeleteFilesetEditResponse, DeleteFilesetResponse, DeleteReleaseEditResponse, DeleteReleaseResponse,
DeleteWebcaptureEditResponse, DeleteWebcaptureResponse, DeleteWorkEditResponse, DeleteWorkResponse, GetChangelogEntryResponse, GetChangelogResponse, GetContainerEditResponse,
GetContainerHistoryResponse, GetContainerRedirectsResponse, GetContainerResponse, GetContainerRevisionResponse, GetCreatorEditResponse, GetCreatorHistoryResponse, GetCreatorRedirectsResponse,
@@ -99,7 +99,7 @@ where
{
let api_clone = api.clone();
router.post(
- "/v0/container",
+ "/v0/editgroup/:editgroup_id/container",
move |req: &mut Request| {
let mut context = Context::default();
@@ -114,15 +114,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -149,7 +154,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_container(param_entity, param_editgroup_id, context).wait() {
+ match api.create_container(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateContainerResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -245,7 +250,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/container/batch",
+ "/v0/editgroup/auto/container/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -260,53 +265,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::ContainerEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::ContainerAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_container_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_container_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateContainerBatchResponse::CreatedEntities(body) => {
+ CreateContainerAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -314,11 +304,11 @@ where
}
Ok(response)
}
- CreateContainerBatchResponse::BadRequest(body) => {
+ CreateContainerAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -326,14 +316,14 @@ where
}
Ok(response)
}
- CreateContainerBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateContainerAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -341,11 +331,11 @@ where
}
Ok(response)
}
- CreateContainerBatchResponse::Forbidden(body) => {
+ CreateContainerAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -353,11 +343,11 @@ where
}
Ok(response)
}
- CreateContainerBatchResponse::NotFound(body) => {
+ CreateContainerAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -365,11 +355,11 @@ where
}
Ok(response)
}
- CreateContainerBatchResponse::GenericError(body) => {
+ CreateContainerAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CONTAINER_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -391,12 +381,12 @@ where
Ok(response)
})
},
- "CreateContainerBatch",
+ "CreateContainerAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/container/:ident",
+ "/v0/editgroup/:editgroup_id/container/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -412,6 +402,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -426,17 +429,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_container(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_container(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteContainerResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -520,7 +513,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/container/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/container/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -536,6 +529,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -550,7 +556,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_container_edit(param_edit_id, context).wait() {
+ match api.delete_container_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteContainerEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -1179,7 +1185,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/container/:ident",
+ "/v0/editgroup/:editgroup_id/container/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -1195,6 +1201,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -1209,16 +1228,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -1244,7 +1253,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_container(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_container(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateContainerResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -1340,7 +1349,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/creator",
+ "/v0/editgroup/:editgroup_id/creator",
move |req: &mut Request| {
let mut context = Context::default();
@@ -1355,15 +1364,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -1390,7 +1404,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_creator(param_entity, param_editgroup_id, context).wait() {
+ match api.create_creator(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateCreatorResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -1486,7 +1500,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/creator/batch",
+ "/v0/editgroup/auto/creator/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -1501,53 +1515,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::CreatorEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::CreatorAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_creator_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_creator_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateCreatorBatchResponse::CreatedEntities(body) => {
+ CreateCreatorAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1555,11 +1554,11 @@ where
}
Ok(response)
}
- CreateCreatorBatchResponse::BadRequest(body) => {
+ CreateCreatorAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1567,14 +1566,14 @@ where
}
Ok(response)
}
- CreateCreatorBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateCreatorAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1582,11 +1581,11 @@ where
}
Ok(response)
}
- CreateCreatorBatchResponse::Forbidden(body) => {
+ CreateCreatorAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1594,11 +1593,11 @@ where
}
Ok(response)
}
- CreateCreatorBatchResponse::NotFound(body) => {
+ CreateCreatorAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1606,11 +1605,11 @@ where
}
Ok(response)
}
- CreateCreatorBatchResponse::GenericError(body) => {
+ CreateCreatorAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_CREATOR_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -1632,12 +1631,12 @@ where
Ok(response)
})
},
- "CreateCreatorBatch",
+ "CreateCreatorAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/creator/:ident",
+ "/v0/editgroup/:editgroup_id/creator/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -1653,6 +1652,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -1667,17 +1679,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_creator(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_creator(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteCreatorResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -1761,7 +1763,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/creator/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/creator/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -1777,6 +1779,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -1791,7 +1806,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_creator_edit(param_edit_id, context).wait() {
+ match api.delete_creator_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteCreatorEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -2513,7 +2528,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/creator/:ident",
+ "/v0/editgroup/:editgroup_id/creator/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -2529,6 +2544,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -2543,16 +2571,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -2578,7 +2596,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_creator(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_creator(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateCreatorResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -4432,7 +4450,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/file",
+ "/v0/editgroup/:editgroup_id/file",
move |req: &mut Request| {
let mut context = Context::default();
@@ -4447,15 +4465,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -4482,7 +4505,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_file(param_entity, param_editgroup_id, context).wait() {
+ match api.create_file(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateFileResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -4578,7 +4601,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/file/batch",
+ "/v0/editgroup/auto/file/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -4593,53 +4616,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::FileEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::FileAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_file_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_file_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateFileBatchResponse::CreatedEntities(body) => {
+ CreateFileAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4647,11 +4655,11 @@ where
}
Ok(response)
}
- CreateFileBatchResponse::BadRequest(body) => {
+ CreateFileAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4659,14 +4667,14 @@ where
}
Ok(response)
}
- CreateFileBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateFileAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4674,11 +4682,11 @@ where
}
Ok(response)
}
- CreateFileBatchResponse::Forbidden(body) => {
+ CreateFileAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4686,11 +4694,11 @@ where
}
Ok(response)
}
- CreateFileBatchResponse::NotFound(body) => {
+ CreateFileAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4698,11 +4706,11 @@ where
}
Ok(response)
}
- CreateFileBatchResponse::GenericError(body) => {
+ CreateFileAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILE_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -4724,12 +4732,12 @@ where
Ok(response)
})
},
- "CreateFileBatch",
+ "CreateFileAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/file/:ident",
+ "/v0/editgroup/:editgroup_id/file/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -4745,6 +4753,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -4759,17 +4780,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_file(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_file(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteFileResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -4853,7 +4864,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/file/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/file/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -4869,6 +4880,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -4883,7 +4907,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_file_edit(param_edit_id, context).wait() {
+ match api.delete_file_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteFileEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -5513,7 +5537,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/file/:ident",
+ "/v0/editgroup/:editgroup_id/file/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -5529,6 +5553,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -5543,16 +5580,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -5578,7 +5605,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_file(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_file(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateFileResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -5674,7 +5701,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/fileset",
+ "/v0/editgroup/:editgroup_id/fileset",
move |req: &mut Request| {
let mut context = Context::default();
@@ -5689,15 +5716,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -5724,7 +5756,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_fileset(param_entity, param_editgroup_id, context).wait() {
+ match api.create_fileset(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateFilesetResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -5820,7 +5852,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/fileset/batch",
+ "/v0/editgroup/auto/fileset/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -5835,53 +5867,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::FilesetEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::FilesetAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_fileset_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_fileset_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateFilesetBatchResponse::CreatedEntities(body) => {
+ CreateFilesetAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5889,11 +5906,11 @@ where
}
Ok(response)
}
- CreateFilesetBatchResponse::BadRequest(body) => {
+ CreateFilesetAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5901,14 +5918,14 @@ where
}
Ok(response)
}
- CreateFilesetBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateFilesetAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5916,11 +5933,11 @@ where
}
Ok(response)
}
- CreateFilesetBatchResponse::Forbidden(body) => {
+ CreateFilesetAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5928,11 +5945,11 @@ where
}
Ok(response)
}
- CreateFilesetBatchResponse::NotFound(body) => {
+ CreateFilesetAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5940,11 +5957,11 @@ where
}
Ok(response)
}
- CreateFilesetBatchResponse::GenericError(body) => {
+ CreateFilesetAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_FILESET_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -5966,12 +5983,12 @@ where
Ok(response)
})
},
- "CreateFilesetBatch",
+ "CreateFilesetAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/fileset/:ident",
+ "/v0/editgroup/:editgroup_id/fileset/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -5987,6 +6004,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -6001,17 +6031,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_fileset(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_fileset(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteFilesetResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -6095,7 +6115,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/fileset/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/fileset/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -6111,6 +6131,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -6125,7 +6158,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_fileset_edit(param_edit_id, context).wait() {
+ match api.delete_fileset_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteFilesetEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -6673,7 +6706,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/fileset/:ident",
+ "/v0/editgroup/:editgroup_id/fileset/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -6689,6 +6722,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -6703,16 +6749,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -6738,7 +6774,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_fileset(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_fileset(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateFilesetResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -6834,7 +6870,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/release",
+ "/v0/editgroup/:editgroup_id/release",
move |req: &mut Request| {
let mut context = Context::default();
@@ -6849,15 +6885,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -6884,7 +6925,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_release(param_entity, param_editgroup_id, context).wait() {
+ match api.create_release(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateReleaseResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -6980,7 +7021,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/release/batch",
+ "/v0/editgroup/auto/release/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -6995,53 +7036,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::ReleaseEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::ReleaseAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_release_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_release_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateReleaseBatchResponse::CreatedEntities(body) => {
+ CreateReleaseAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7049,11 +7075,11 @@ where
}
Ok(response)
}
- CreateReleaseBatchResponse::BadRequest(body) => {
+ CreateReleaseAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7061,14 +7087,14 @@ where
}
Ok(response)
}
- CreateReleaseBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateReleaseAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7076,11 +7102,11 @@ where
}
Ok(response)
}
- CreateReleaseBatchResponse::Forbidden(body) => {
+ CreateReleaseAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7088,11 +7114,11 @@ where
}
Ok(response)
}
- CreateReleaseBatchResponse::NotFound(body) => {
+ CreateReleaseAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7100,11 +7126,11 @@ where
}
Ok(response)
}
- CreateReleaseBatchResponse::GenericError(body) => {
+ CreateReleaseAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_RELEASE_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -7126,12 +7152,12 @@ where
Ok(response)
})
},
- "CreateReleaseBatch",
+ "CreateReleaseAutoBatch",
);
let api_clone = api.clone();
router.post(
- "/v0/work",
+ "/v0/editgroup/:editgroup_id/work",
move |req: &mut Request| {
let mut context = Context::default();
@@ -7146,15 +7172,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -7181,7 +7212,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_work(param_entity, param_editgroup_id, context).wait() {
+ match api.create_work(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateWorkResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -7277,7 +7308,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/release/:ident",
+ "/v0/editgroup/:editgroup_id/release/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -7293,6 +7324,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -7307,17 +7351,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_release(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_release(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteReleaseResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -7401,7 +7435,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/release/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/release/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -7417,6 +7451,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -7431,7 +7478,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_release_edit(param_edit_id, context).wait() {
+ match api.delete_release_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteReleaseEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -8364,7 +8411,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/release/:ident",
+ "/v0/editgroup/:editgroup_id/release/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -8380,6 +8427,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -8394,16 +8454,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -8429,7 +8479,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_release(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_release(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateReleaseResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -8525,7 +8575,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/webcapture",
+ "/v0/editgroup/:editgroup_id/webcapture",
move |req: &mut Request| {
let mut context = Context::default();
@@ -8540,15 +8590,20 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
+ // Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
@@ -8575,7 +8630,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.create_webcapture(param_entity, param_editgroup_id, context).wait() {
+ match api.create_webcapture(param_editgroup_id, param_entity, context).wait() {
Ok(rsp) => match rsp {
CreateWebcaptureResponse::CreatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -8671,7 +8726,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/webcapture/batch",
+ "/v0/editgroup/auto/webcapture/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -8686,53 +8741,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::WebcaptureEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::WebcaptureAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_webcapture_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_webcapture_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateWebcaptureBatchResponse::CreatedEntities(body) => {
+ CreateWebcaptureAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8740,11 +8780,11 @@ where
}
Ok(response)
}
- CreateWebcaptureBatchResponse::BadRequest(body) => {
+ CreateWebcaptureAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8752,14 +8792,14 @@ where
}
Ok(response)
}
- CreateWebcaptureBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateWebcaptureAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8767,11 +8807,11 @@ where
}
Ok(response)
}
- CreateWebcaptureBatchResponse::Forbidden(body) => {
+ CreateWebcaptureAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8779,11 +8819,11 @@ where
}
Ok(response)
}
- CreateWebcaptureBatchResponse::NotFound(body) => {
+ CreateWebcaptureAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8791,11 +8831,11 @@ where
}
Ok(response)
}
- CreateWebcaptureBatchResponse::GenericError(body) => {
+ CreateWebcaptureAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WEBCAPTURE_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -8817,12 +8857,12 @@ where
Ok(response)
})
},
- "CreateWebcaptureBatch",
+ "CreateWebcaptureAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/webcapture/:ident",
+ "/v0/editgroup/:editgroup_id/webcapture/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -8838,6 +8878,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -8852,17 +8905,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_webcapture(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_webcapture(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteWebcaptureResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -8946,7 +8989,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/webcapture/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/webcapture/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -8962,6 +9005,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -8976,7 +9032,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_webcapture_edit(param_edit_id, context).wait() {
+ match api.delete_webcapture_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteWebcaptureEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -9524,7 +9580,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/webcapture/:ident",
+ "/v0/editgroup/:editgroup_id/webcapture/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -9540,6 +9596,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -9554,16 +9623,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -9589,7 +9648,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_webcapture(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_webcapture(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateWebcaptureResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -9685,7 +9744,7 @@ where
let api_clone = api.clone();
router.post(
- "/v0/work/batch",
+ "/v0/editgroup/auto/work/batch",
move |req: &mut Request| {
let mut context = Context::default();
@@ -9700,53 +9759,38 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_autoaccept = query_params
- .get("autoaccept")
- .and_then(|list| list.first())
- .and_then(|x| Some(x.to_lowercase().parse::<bool>()))
- .map_or_else(|| Ok(None), |x| x.map(|v| Some(v)))
- .map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;
- let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_description = query_params.get("description").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
- let param_extra = query_params.get("extra").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok());
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req
+ let param_auto_batch = req
.get::<bodyparser::Raw>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
- let param_entity_list = if let Some(param_entity_list_raw) = param_entity_list {
- let deserializer = &mut serde_json::Deserializer::from_str(&param_entity_list_raw);
+ let param_auto_batch = if let Some(param_auto_batch_raw) = param_auto_batch {
+ let deserializer = &mut serde_json::Deserializer::from_str(&param_auto_batch_raw);
- let param_entity_list: Option<Vec<models::WorkEntity>> = serde_ignored::deserialize(deserializer, |path| {
+ let param_auto_batch: Option<models::WorkAutoBatch> = serde_ignored::deserialize(deserializer, |path| {
warn!("Ignoring unknown field in body: {}", path);
unused_elements.push(path.to_string());
})
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - doesn't match schema: {}", e))))?;
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter auto_batch - doesn't match schema: {}", e))))?;
- param_entity_list
+ param_auto_batch
} else {
None
};
- let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?;
+ let param_auto_batch = param_auto_batch.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter auto_batch".to_string())))?;
- match api
- .create_work_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, param_description, param_extra, context)
- .wait()
- {
+ match api.create_work_auto_batch(param_auto_batch, context).wait() {
Ok(rsp) => match rsp {
- CreateWorkBatchResponse::CreatedEntities(body) => {
+ CreateWorkAutoBatchResponse::CreatedEditgroup(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(201), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_CREATED_ENTITIES.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_CREATED_EDITGROUP.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9754,11 +9798,11 @@ where
}
Ok(response)
}
- CreateWorkBatchResponse::BadRequest(body) => {
+ CreateWorkAutoBatchResponse::BadRequest(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(400), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_BAD_REQUEST.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_BAD_REQUEST.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9766,14 +9810,14 @@ where
}
Ok(response)
}
- CreateWorkBatchResponse::NotAuthorized { body, www_authenticate } => {
+ CreateWorkAutoBatchResponse::NotAuthorized { body, www_authenticate } => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(401), body_string));
header! { (ResponseWwwAuthenticate, "WWW_Authenticate") => [String] }
response.headers.set(ResponseWwwAuthenticate(www_authenticate));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_NOT_AUTHORIZED.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_NOT_AUTHORIZED.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9781,11 +9825,11 @@ where
}
Ok(response)
}
- CreateWorkBatchResponse::Forbidden(body) => {
+ CreateWorkAutoBatchResponse::Forbidden(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(403), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_FORBIDDEN.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_FORBIDDEN.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9793,11 +9837,11 @@ where
}
Ok(response)
}
- CreateWorkBatchResponse::NotFound(body) => {
+ CreateWorkAutoBatchResponse::NotFound(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(404), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_NOT_FOUND.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_NOT_FOUND.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9805,11 +9849,11 @@ where
}
Ok(response)
}
- CreateWorkBatchResponse::GenericError(body) => {
+ CreateWorkAutoBatchResponse::GenericError(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
let mut response = Response::with((status::Status::from_u16(500), body_string));
- response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_BATCH_GENERIC_ERROR.clone()));
+ response.headers.set(ContentType(mimetypes::responses::CREATE_WORK_AUTO_BATCH_GENERIC_ERROR.clone()));
context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
if !unused_elements.is_empty() {
@@ -9831,12 +9875,12 @@ where
Ok(response)
})
},
- "CreateWorkBatch",
+ "CreateWorkAutoBatch",
);
let api_clone = api.clone();
router.delete(
- "/v0/work/:ident",
+ "/v0/editgroup/:editgroup_id/work/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -9852,6 +9896,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -9866,17 +9923,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
- match api.delete_work(param_ident, param_editgroup_id, context).wait() {
+ match api.delete_work(param_editgroup_id, param_ident, context).wait() {
Ok(rsp) => match rsp {
DeleteWorkResponse::DeletedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -9960,7 +10007,7 @@ where
let api_clone = api.clone();
router.delete(
- "/v0/work/edit/:edit_id",
+ "/v0/editgroup/:editgroup_id/work/edit/:edit_id",
move |req: &mut Request| {
let mut context = Context::default();
@@ -9976,6 +10023,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_edit_id = {
let param = req
.extensions
@@ -9990,7 +10050,7 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter edit_id: {}", e))))?
};
- match api.delete_work_edit(param_edit_id, context).wait() {
+ match api.delete_work_edit(param_editgroup_id, param_edit_id, context).wait() {
Ok(rsp) => match rsp {
DeleteWorkEditResponse::DeletedEdit(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");
@@ -10631,7 +10691,7 @@ where
let api_clone = api.clone();
router.put(
- "/v0/work/:ident",
+ "/v0/editgroup/:editgroup_id/work/:ident",
move |req: &mut Request| {
let mut context = Context::default();
@@ -10647,6 +10707,19 @@ where
let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?;
// Path parameters
+ let param_editgroup_id = {
+ let param = req
+ .extensions
+ .get::<Router>()
+ .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
+ .find("editgroup_id")
+ .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?;
+ percent_decode(param.as_bytes())
+ .decode_utf8()
+ .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))?
+ .parse()
+ .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))?
+ };
let param_ident = {
let param = req
.extensions
@@ -10661,16 +10734,6 @@ where
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))?
};
- // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
- let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default();
- let param_editgroup_id = query_params
- .get("editgroup_id")
- .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter editgroup_id".to_string())))?
- .first()
- .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter editgroup_id was empty".to_string())))?
- .parse::<String>()
- .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter editgroup_id - doesn't match schema: {}", e))))?;
-
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
@@ -10696,7 +10759,7 @@ where
};
let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?;
- match api.update_work(param_ident, param_entity, param_editgroup_id, context).wait() {
+ match api.update_work(param_editgroup_id, param_ident, param_entity, context).wait() {
Ok(rsp) => match rsp {
UpdateWorkResponse::UpdatedEntity(body) => {
let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize");