-
Notifications
You must be signed in to change notification settings - Fork 9
Support 21095 Create OpenAPI 3 file for ObjectUpload #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xuemeigan
wants to merge
2
commits into
master
Choose a base branch
from
Support--21095--Create-OpenAPI-3-file-for-ObjectUpload
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,188 @@ | ||
paths: | ||
/v1/object-upload: | ||
get: | ||
summary: List object-uploads | ||
operationId: getObjectUploads | ||
description: By passing in query string, user can get available object-uploads authorised | ||
parameters: | ||
- in: query | ||
name: filter[rsql] | ||
description: pass an optional search string for looking up the object-uploads | ||
schema: | ||
type: string | ||
- in: query | ||
name: sort | ||
description: optional sort string, can have sort order such as descending denoted by "-" | ||
schema: | ||
type: string | ||
- in: query | ||
name: page[offset] | ||
description: number of records to skip when paging | ||
schema: | ||
type: integer | ||
format: int32 | ||
- in: query | ||
name: page[limit] | ||
description: maximum number of records to return when paging | ||
schema: | ||
type: integer | ||
format: int32 | ||
minimum: 0 | ||
maximum: 50 | ||
responses: | ||
'200': | ||
description: object-uploads satifying the query restrictions | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ObjectUpload' | ||
'400': | ||
description: bad input parameter | ||
'404': | ||
description: object-uploads not found | ||
/v1/object-upload/{Id}: | ||
get: | ||
summary: Get an object-upload | ||
description: Return a single object-upload | ||
operationId: getObjectUploadById | ||
parameters: | ||
- name: Id | ||
in: path | ||
description: ID of object-upload to return | ||
required: true | ||
schema: | ||
type: string | ||
format: uuid | ||
responses: | ||
"200": | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ObjectUpload' | ||
"400": | ||
description: Invalid ID supplied | ||
"404": | ||
description: object-upload not found | ||
/v1/file/{bucket}: | ||
post: | ||
summary: Upload a file to minio bucket | ||
operationId: uploadFile | ||
description: Upload a file to minio bucket | ||
parameters: | ||
- name: bucket | ||
in: path | ||
description: bucket of the file | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'201': | ||
description: file uploaded | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ObjectUpload' | ||
'400': | ||
description: invalid input, object invalid | ||
'409': | ||
description: A file already exists | ||
requestBody: | ||
content: | ||
multipart/form-data: | ||
schema: | ||
type: object | ||
properties: | ||
bucket: | ||
type: string | ||
file: | ||
type: string | ||
format: base64 | ||
components: | ||
schemas: | ||
ObjectUpload: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
allOf: | ||
- $ref: '#/components/schemas/CommonObjectUpload' | ||
|
||
NewObjectUpload: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
type: object | ||
allOf: | ||
- $ref: '#/components/schemas/CommonObjectUpload' | ||
CommonObjectUpload: | ||
type: object | ||
required: | ||
- type | ||
- attributes | ||
properties: | ||
type: | ||
enum: [object-upload] | ||
description: The type of the object-upload data being returned. | ||
attributes: | ||
type: object | ||
required: | ||
- fileIdentifier | ||
- originalFilename | ||
- sha1Hex | ||
- bucket | ||
properties: | ||
fileIdentifier: | ||
type: string | ||
format: uuid | ||
description: uploaded file's uuid | ||
createdBy: | ||
type: string | ||
description: agent who has uploaded the file | ||
createdOn: | ||
type: string | ||
description: | ||
Point in time (ISO 8601 Date/Time) recording when the object-upload was created | ||
originalFilename: | ||
type: string | ||
description: original file name when it is uploaded | ||
sha1Hex: | ||
type: string | ||
description: original file's hex string representing the SHA-1 encoded file content | ||
receivedMediaType: | ||
type: string | ||
description: original file's mediaType as it is received | ||
detectedMediaType: | ||
type: string | ||
description: detected mediaType as by a library | ||
detectedFileExtension: | ||
type: string | ||
description: detected file extenstion | ||
evaluatedMediaType: | ||
type: string | ||
description: evaluated media type | ||
evaluatedFileExtension: | ||
type: string | ||
description: evaluated file extension | ||
sizeInBytes: | ||
type: string | ||
description: file size in bytes | ||
thumbnailIdentifier: | ||
type: string | ||
format: uuid | ||
description: uploaded file's thumbnail identifier | ||
bucket: | ||
type: string | ||
description: bucket name as in minio server storage |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to define the bucket in the parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at here : https://github.com/DINA-Web/object-store-specs/blob/Support--21095--Create-OpenAPI-3-file-for-ObjectUpload/schema/object-upload.yml#L85
The parameter is described in request body of form-data