From 040e7fb72ff5161aa51e8343d07b4a421e8d87dd Mon Sep 17 00:00:00 2001 From: Jon Anders Sollien Date: Mon, 27 Jan 2025 12:07:46 +0100 Subject: [PATCH 1/5] Composition test --- swagger.yaml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index a318855..d35dc3f 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -28,19 +28,11 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/project_GET' data: type: array items: @@ -2067,6 +2059,22 @@ paths: } components: schemas: + pagination: + type: object + required: + - skip + - top + - totalCount + - data + properties: + skip: + type: integer + top: + type: integer + totalCount: + type: integer + nextLink: + type: string # error error: type: object From 0178d4648721e8525ea5664f118350a147601def Mon Sep 17 00:00:00 2001 From: Jon Anders Sollien Date: Mon, 27 Jan 2025 12:09:22 +0100 Subject: [PATCH 2/5] Update swagger.yaml --- swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger.yaml b/swagger.yaml index d35dc3f..aba457a 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -32,7 +32,7 @@ paths: - data properties: pagination: - $ref: '#/components/schemas/project_GET' + $ref: '#/components/schemas/pagination' data: type: array items: From 08d8bc518c87209c9bf50e552e239386312bac3a Mon Sep 17 00:00:00 2001 From: Jon Anders Sollien Date: Mon, 10 Feb 2025 11:42:39 +0100 Subject: [PATCH 3/5] Update swagger.yaml --- swagger.yaml | 48 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index aba457a..ac235a4 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -234,9 +234,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -442,9 +440,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -515,9 +511,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -634,9 +628,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -795,9 +787,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1391,9 +1381,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1483,9 +1471,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1611,9 +1597,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1733,9 +1717,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1824,9 +1806,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -1916,9 +1896,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: @@ -2010,9 +1988,7 @@ paths: schema: type: object required: - - skip - - top - - totalCount + - pagination - data properties: skip: From d48bc2338aec2415458335c637d2cf0d62620bf6 Mon Sep 17 00:00:00 2001 From: Jon Anders Sollien Date: Mon, 10 Feb 2025 11:44:21 +0100 Subject: [PATCH 4/5] Update swagger.yaml --- swagger.yaml | 120 +++++++++++---------------------------------------- 1 file changed, 24 insertions(+), 96 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index ac235a4..eed71b1 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -237,14 +237,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -443,14 +437,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -514,14 +502,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -631,14 +613,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -790,14 +766,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1384,14 +1354,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1474,14 +1438,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1600,14 +1558,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1720,14 +1672,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1809,14 +1755,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1899,14 +1839,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: @@ -1991,14 +1925,8 @@ paths: - pagination - data properties: - skip: - type: integer - top: - type: integer - totalCount: - type: integer - nextLink: - type: string + pagination: + $ref: '#/components/schemas/pagination' data: type: array items: From 5002ff3412063924d3e0d09fb37dcb1fe173deee Mon Sep 17 00:00:00 2001 From: Jon Anders Sollien Date: Mon, 10 Feb 2025 11:47:06 +0100 Subject: [PATCH 5/5] examples --- swagger.yaml | 130 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 52 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index eed71b1..1e3eeb0 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -39,10 +39,12 @@ paths: $ref: '#/components/schemas/project_GET' example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "project_id": "F445F4F2-4D02-4B2A-B612-5E456BEF9137", "name": "Example project 1", @@ -245,10 +247,12 @@ paths: $ref: '#/components/schemas/topic_GET' example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "guid": "A245F4F2-2C01-B43B-B612-5E456BEF8116", "server_assigned_id": "ISSUE-00001", @@ -445,10 +449,12 @@ paths: $ref: "#/components/schemas/project_files_information_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "display_information": [{ "field_display_name": "Model Name", @@ -510,10 +516,12 @@ paths: $ref: "#/components/schemas/file_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "ifc_project": "0J$yPqHBD12v72y4qF6XcD", "file_name": "OfficeBuilding_Architecture_0001.ifc", @@ -621,10 +629,12 @@ paths: $ref: "#/components/schemas/comment_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "guid": "C4215F4D-AC45-A43A-D615-AA456BEF832B", "date": "2016-08-01T12:34:22.409Z", @@ -774,10 +784,12 @@ paths: $ref: "#/components/schemas/viewpoint_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "guid": "b24a82e9-f67b-43b8-bda0-4946abf39624", "perspective_camera": { @@ -1362,10 +1374,12 @@ paths: $ref: "#/components/schemas/related_topic_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "related_topic_guid": "db49df2b-0e42-473b-a3ee-f7b785d783c4" }, { @@ -1446,10 +1460,12 @@ paths: $ref: "#/components/schemas/document_reference_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "guid": "212ab37a-6122-448e-86fc-86503183b520", "url": "http://example.com/files/LegalRequirements.pdf", @@ -1566,10 +1582,12 @@ paths: $ref: "#/components/schemas/document_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "guid": "472ab37a-6122-448e-86fc-86503183b520", "filename": "LegalRequirements.pdf" @@ -1680,10 +1698,12 @@ paths: $ref: "#/components/schemas/topic_event_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "topic_guid": "A211FCC2-3A3B-EAA4-C321-DE22ABC8414", "date": "2014-11-19T14:24:11.316Z", @@ -1763,10 +1783,12 @@ paths: $ref: "#/components/schemas/topic_event_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "topic_guid": "A245F4F2-2C01-B43B-B612-5E456BEF8116", "date": "2014-11-19T14:24:11.316Z", @@ -1847,10 +1869,12 @@ paths: $ref: "#/components/schemas/comment_event_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "comment_guid": "C4215F4D-AC45-A43A-D615-AA456BEF832B", "topic_guid": "A211FCC2-3A3B-EAA4-C321-DE22ABC8414", @@ -1933,10 +1957,12 @@ paths: $ref: "#/components/schemas/comment_event_GET" example: { - "skip": 0, - "top": 1000, - "totalCount": 2, - "nextLink": null, + "pagination": { + "skip": 0, + "top": 1000, + "totalCount": 2, + "nextLink": null + }, "data": [{ "comment_guid": "C4215F4D-AC45-A43A-D615-AA456BEF832B", "topic_guid": "A211FCC2-3A3B-EAA4-C321-DE22ABC8414",