Skip to content

Commit

Permalink
feat: make data and pagination required in swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed May 27, 2024
1 parent 8eb756d commit cc93c59
Showing 1 changed file with 8 additions and 42 deletions.
50 changes: 8 additions & 42 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ paths:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
Expand Down Expand Up @@ -59,6 +60,7 @@ paths:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
Expand Down Expand Up @@ -183,26 +185,14 @@ paths:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: '#/components/schemas/Proposal'
pagination:
type: object
properties:
page:
type: integer
minimum: 0
per_page:
type: integer
minimum: 0
total_pages:
type: integer
minimum: 0
total_items:
type: integer
minimum: 0
$ref: '#/components/schemas/Pagination'
/api/v1/gov/search/{text}:
get:
summary: Get a list of governance proposals matching a text in the title
Expand All @@ -227,26 +217,14 @@ paths:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: '#/components/schemas/Proposal'
pagination:
type: object
properties:
page:
type: integer
minimum: 0
per_page:
type: integer
minimum: 0
total_pages:
type: integer
minimum: 0
total_items:
type: integer
minimum: 0
$ref: '#/components/schemas/Pagination'
/api/v1/gov/proposal/{id}:
get:
summary: Get a governance proposal by proposal id
Expand Down Expand Up @@ -283,26 +261,14 @@ paths:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: '#/components/schemas/Vote'
pagination:
type: object
properties:
page:
type: integer
minimum: 0
per_page:
type: integer
minimum: 0
total_pages:
type: integer
minimum: 0
total_items:
type: integer
minimum: 0
$ref: '#/components/schemas/Pagination'
/api/v1/gov/proposal/{id}/votes/{address}:
get:
summary: Get all the votes for a governance proposal from an address
Expand Down

0 comments on commit cc93c59

Please sign in to comment.