Skip to content
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

docs!: Add missing required Accept header. #43

Merged
1 commit merged into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions api/openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Tempsy RESTful API
description: Temporary Files Storage API Documentation
version: 0.3.0
version: 0.5.0
license:
name: MIT
url: https://opensource.org/license/mit
Expand All @@ -25,6 +25,7 @@ paths:
summary: Get all files
description: Get all files of the user
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
responses:
200:
Expand Down Expand Up @@ -82,6 +83,7 @@ paths:
summary: Upload file
description: Upload file on the server by the user
parameters:
- $ref: '#/components/parameters/accept'
- name: File-Name
in: header
description: File name of the file want to be uploaded
Expand Down Expand Up @@ -172,6 +174,7 @@ paths:
summary: Delete all files
description: Delete all files of the user
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
responses:
204:
Expand Down Expand Up @@ -205,6 +208,7 @@ paths:
summary: Get public file
description: Get public file by file name
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
- $ref: '#/components/parameters/filename'
responses:
Expand Down Expand Up @@ -244,6 +248,7 @@ paths:
summary: Get file
description: Get file by file name
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
- $ref: '#/components/parameters/filename'
responses:
Expand Down Expand Up @@ -282,6 +287,7 @@ paths:
summary: Update file
description: Update file by file name
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
- $ref: '#/components/parameters/filename'
- $ref: '#/components/parameters/fileMetaAutoDeletedAt'
Expand Down Expand Up @@ -349,6 +355,7 @@ paths:
summary: Delete file
description: Delete file by file name
parameters:
- $ref: '#/components/parameters/accept'
- $ref: '#/components/parameters/username'
- $ref: '#/components/parameters/filename'
responses:
Expand Down Expand Up @@ -381,6 +388,8 @@ paths:
- auth
summary: Get user info
description: Return total files and username
parameters:
- $ref: '#/components/parameters/accept'
responses:
200:
description: Success
Expand Down Expand Up @@ -433,6 +442,8 @@ paths:
- auth
summary: Get guest token
description: return guest token
parameters:
- $ref: '#/components/parameters/accept'
responses:
200:
description: Success
Expand Down Expand Up @@ -503,7 +514,7 @@ components:
fileMetaAutoDeletedAt:
name: File-Auto-Deleted-At
in: header
description: File will be deleted at
description: File will be deleted at, max is one year since now
required: true
schema:
type: integer
Expand All @@ -525,6 +536,17 @@ components:
schema:
type: string
format: name.ext
accept:
name: Accept
required: true
in: header
description: Accept Content-Type must be application/json if you want this response api
schema:
type: string
description: Accepted Content-Type by client
enum:
- application/json
- application/json; charset=utf-8
type:
name: Content-Type
required: true
Expand Down