mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
19089f21d2
This commit adds API documentation for the new upload endpoints related to direct + multipart external uploads. Also included is a rake task which watches the files in the spec/requests/api directory and calls a script file (spec/regenerate_swagger_docs) whenever one changes. This script runs rake rswag:specs:swaggerize and then copies the openapi.yml file over to the discourse_api_docs repo directory, and hits a script there to convert the YML to JSON so the API docs are refreshed while the server is still running. This makes the loop of making a doc change and seeing it in the local server much faster. The rake task is rake autospec:swagger
29 lines
723 B
JSON
29 lines
723 B
JSON
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"unique_identifier": {
|
|
"type": "string",
|
|
"example": "66e86218-80d9-4bda-b4d5-2b6def968705",
|
|
"description": "The unique identifier returned in the original /create-multipart request."
|
|
},
|
|
"parts": {
|
|
"type": "array",
|
|
"example": [
|
|
{
|
|
"part_number": 1,
|
|
"etag": "0c376dcfcc2606f4335bbc732de93344"
|
|
},
|
|
{
|
|
"part_number": 2,
|
|
"etag": "09ert8cfcc2606f4335bbc732de91122"
|
|
}
|
|
],
|
|
"description": "All of the part numbers and their corresponding ETags that have been uploaded must be provided."
|
|
}
|
|
},
|
|
"required": [
|
|
"unique_identifier",
|
|
"parts"
|
|
]
|
|
}
|