From cc93c59c40e54d5acfb282922f645877f13cb720 Mon Sep 17 00:00:00 2001 From: Mateusz Jasiuk Date: Mon, 27 May 2024 11:23:14 +0200 Subject: [PATCH] feat: make data and pagination required in swagger --- swagger.yml | 50 ++++++++------------------------------------------ 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/swagger.yml b/swagger.yml index dea0db4fc..4b483825e 100644 --- a/swagger.yml +++ b/swagger.yml @@ -30,6 +30,7 @@ paths: application/json: schema: type: object + required: [data, pagination] properties: data: type: array @@ -59,6 +60,7 @@ paths: application/json: schema: type: object + required: [data, pagination] properties: data: type: array @@ -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 @@ -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 @@ -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