-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API spec; rename
dryrun
parameter to dry_run
- Loading branch information
Showing
12 changed files
with
194 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,46 @@ | |
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/minimal_response" | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/minimal_response" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"paper": { | ||
"$ref": "#/components/schemas/paper" | ||
}, | ||
"papers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/paper" | ||
} | ||
}, | ||
"change_list": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"change_lists": { | ||
"type": "array", | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"valid": { | ||
"type": "array", | ||
"items": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
|
@@ -112,14 +151,32 @@ | |
"$ref": "#/components/parameters/p.opt" | ||
}, | ||
{ | ||
"name": "dryrun", | ||
"name": "dry_run", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
}, | ||
{ | ||
"name": "disable_users", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
}, | ||
{ | ||
"name": "add_topics", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
}, | ||
{ | ||
"name": "notify", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
} | ||
], | ||
"summary": "Create or modify submission(s)", | ||
"description": "### Single submission\n\nA request with a `p` parameter (as a path parameter `/{p}/paper` or a query\nparameter) modifies the submission with that ID. The special ID `new` can be\nused to create a submission.\n\nThe body of the request may be formatted as an HTML form\n(`application/x-www-form-urlencoded` or `multipart/form-data`), a JSON object\n(`application/json`), or a ZIP file (`application/zip`—see below). HTML form\ninput follows the conventions of the HotCRP web application and is subject to\nchange at any time.\n\n### Multiple submissions\n\nA request with no `p` parameter can create or modify any number of\nsubmissions.\n\n### ZIP uploads\n\nA ZIP upload should contain a file named `data.json` (`PREFIX-data.json` is\nalso acceptable). This file’s content is parsed as JSON and treated a\nsubmission object (or array of submission objects). Attachment fields in the\nJSON content can refer to other files in the ZIP. For instance, this shell\nsession might upload a submission with content `paper.pdf`:\n\n```\n$ cat data.json\n{\n\t\"object\": \"paper\",\n\t\"pid\": \"new\",\n\t\"title\": \"Aught: A Methodology for the Visualization of Scheme\",\n\t\"authors\": [{\"name\": \"Nevaeh Gomez\", \"email\": \"[email protected]\"}],\n\t\"submission\": {\"content_file\": \"paper.pdf\"},\n\t\"status\": \"submitted\"\n}\n$ zip upload.zip data.json paper.pdf\n$ curl -H \"Authorization: bearer hct_XXX\" --data-binary @upload.zip -H \"Content-Type: application/zip\" SITEURL/api/paper\n```\n" | ||
"description": "### Single submission\n\nA request with a `p` parameter (as a path parameter `/{p}/paper` or a query\nparameter) modifies the submission with that ID. The special ID `new` can be\nused to create a submission.\n\nModifications are specified using a JSON object. There are three ways to\nprovide that JSON, depending on the content-type of the request:\n\n1. As a request body with content-type `application/json`.\n2. As a file named `data.json` in an uploaded ZIP archive, with content-type\n `application/zip`.\n3. As a parameter named `json` (body type\n `application/x-www-form-urlencoded` or `multipart/form-data`).\n\nThe JSON upload must be formatted as an object.\n\nZIP and form uploads also support document upload. A document is referenced\nvia `content_file` fields in the JSON.\n\n### Multiple submissions\n\nA request with no `p` parameter can create or modify any number of\nsubmissions. Upload types are the same as for single submissions, but the JSON\nupload is defined as an array of objects. These objects are processed in turn.\n\nCurrently, multiple-submission upload is only allowed for administrators.\n\n### ZIP uploads\n\nA ZIP upload should contain a file named `data.json` (`PREFIX-data.json` is\nalso acceptable). This file’s content is parsed as JSON and treated a\nsubmission object (or array of submission objects). Attachment fields in the\nJSON content can refer to other files in the ZIP. For instance, this shell\nsession might upload a submission with content `paper.pdf`:\n\n```\n$ cat data.json\n{\n\t\"object\": \"paper\",\n\t\"pid\": \"new\",\n\t\"title\": \"Aught: A Methodology for the Visualization of Scheme\",\n\t\"authors\": [{\"name\": \"Nevaeh Gomez\", \"email\": \"[email protected]\"}],\n\t\"submission\": {\"content_file\": \"paper.pdf\"},\n\t\"status\": \"submitted\"\n}\n$ zip upload.zip data.json paper.pdf\n$ curl -H \"Authorization: bearer hct_XXX\" --data-binary @upload.zip -H \"Content-Type: application/zip\" SITEURL/api/paper\n```\n### Parameters\n\nSet `dry_run=1` to check the upload for errors without modifying the\ndatabase.\n\nThree additional parameters are available to administrators. Set\n`disable_users=1` to disable newly-created users; set `add_topics=1` to\nautomatically add newly-referenced topics; and set `notify=0` to make changes\nwithout notifying contacts.\n\n### Responses\n" | ||
} | ||
}, | ||
"/formatcheck": { | ||
|
@@ -1003,7 +1060,8 @@ | |
} | ||
} | ||
} | ||
} | ||
}, | ||
"summary": "Retrieve search results" | ||
} | ||
}, | ||
"/fieldhtml": { | ||
|
@@ -3557,27 +3615,6 @@ | |
"tags": [ | ||
"Settings" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "dryrun", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
} | ||
], | ||
"requestBody": { | ||
"description": "", | ||
"content": { | ||
"application/x-www-form-urlencoded": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"settings": {} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "", | ||
|
@@ -3618,7 +3655,19 @@ | |
], | ||
"parameters": [ | ||
{ | ||
"name": "dryrun", | ||
"name": "dry_run", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
}, | ||
{ | ||
"name": "reset", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
}, | ||
{ | ||
"name": "filename", | ||
"in": "query", | ||
"required": false, | ||
"schema": {} | ||
|
@@ -3651,7 +3700,7 @@ | |
"type": "object", | ||
"properties": { | ||
"dry_run": {}, | ||
"changes": {} | ||
"change_list": {} | ||
} | ||
} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.