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

improved API doc: fixed some example values, correcte security schemas #47

Merged
merged 1 commit into from
Feb 26, 2019
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
28 changes: 23 additions & 5 deletions doc/api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ securityDefinitions:
type: apiKey
name: Authorization
in: header
service_token:
description: Service master token
type: apiKey
name: Authorization
in: header

# URL patterns
paths:
Expand Down Expand Up @@ -82,7 +87,7 @@ paths:
401:
description: Unauthorized. Invalid or missing master token
security:
- basket_token: []
- service_token: []

/api/baskets:
get:
Expand Down Expand Up @@ -116,7 +121,7 @@ paths:
401:
description: Unauthorized. Invalid or missing master token
security:
- basket_token: []
- service_token: []

/api/baskets/{name}:
post:
Expand Down Expand Up @@ -412,7 +417,7 @@ paths:
401:
description: Unauthorized. Invalid or missing master token
security:
- basket_token: []
- service_token: []

/baskets/{name}:
post:
Expand Down Expand Up @@ -783,6 +788,10 @@ definitions:
description: Collection of basket names
items:
type: string
example:
- basket22
- mybasket
- test123
count:
type: integer
description: Total number of baskets in the system; not present if query is applied
Expand Down Expand Up @@ -867,11 +876,11 @@ definitions:
content_length:
type: integer
description: Content length of request
example: 39
example: 24
body:
type: string
description: Content of request body
example: { 'user' : 'abc_test', 'status' : 200 }
example: user=abc_test&status=200
method:
type: string
description: HTTP method of request
Expand All @@ -893,6 +902,14 @@ definitions:
description: Collection of header values
items:
type: string
example:
Content-Type:
- application/json
Accept:
- application/json
- application/xml
Connection:
- close

Response:
type: object
Expand All @@ -912,3 +929,4 @@ definitions:
description: |
If set to `true` the body is treated as [HTML template](https://golang.org/pkg/html/template) that accepts
input from request parameters.
example: false