Skip to content

Commit

Permalink
Update spec/rails/doc/openapi.yaml sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Roccoberton committed Mar 18, 2022
1 parent 686a001 commit 57e4a54
Showing 1 changed file with 47 additions and 53 deletions.
100 changes: 47 additions & 53 deletions spec/rails/doc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,20 @@ paths:
summary: index
tags:
- Table
parameters:
- name: page
in: query
schema:
type: integer
example: 1
- name: per
in: query
schema:
type: integer
example: 10
- name: filter[name]
in: query
schema:
type: object
properties:
name:
type: string
example:
name: Example Table
- name: filter[price]
in: query
schema:
type: object
properties:
price:
type: string
example:
price: '0'
- name: X-Authorization-Token
in: header
required: true
schema:
type: string
example: token
responses:
'401':
description: does not return tables if unauthorized
content:
application/json:
schema:
type: object
properties:
message:
type: string
example:
message: Unauthorized
'200':
description: returns a list of tables
description: with flat query parameters
content:
application/json:
schema:
Expand Down Expand Up @@ -92,17 +68,41 @@ paths:
storage_size: 12.3
created_at: '2020-07-17T00:00:00+00:00'
updated_at: '2020-07-17T00:00:00+00:00'
'401':
description: does not return tables if unauthorized
content:
application/json:
schema:
type: object
properties:
message:
type: string
example:
message: Unauthorized
parameters:
- name: page
in: query
schema:
type: integer
example: 1
- name: per
in: query
schema:
type: integer
example: 10
- name: X-Authorization-Token
in: header
required: true
schema:
type: string
example: token
- name: filter[name]
in: query
schema:
type: object
properties:
name:
type: string
example:
name: Example Table
- name: filter[price]
in: query
schema:
type: object
properties:
price:
type: string
example:
price: '0'
post:
summary: create
tags:
Expand Down Expand Up @@ -176,12 +176,6 @@ paths:
schema:
type: integer
example: 1
- name: id
in: path
required: true
schema:
type: integer
example: 2
responses:
'200':
description: returns a table
Expand Down

0 comments on commit 57e4a54

Please sign in to comment.