From 475c8e847705c2feb61a99ccadbc0a20de53fd7c Mon Sep 17 00:00:00 2001 From: ruslankesheshyan Date: Mon, 21 Nov 2022 11:39:06 -0800 Subject: [PATCH 1/4] Added openapi validation --- .idea/.gitignore | 8 ++++++++ .idea/api.iml | 9 +++++++++ .idea/misc.xml | 9 +++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ script/bootstrap | 1 + script/test | 1 + 7 files changed, 42 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/api.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/api.iml b/.idea/api.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/api.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d79bd4e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d50cf45 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/script/bootstrap b/script/bootstrap index 1ef4a91..8953dc1 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -38,3 +38,4 @@ elif [[ "$(uname)" = "Linux" ]]; then fi npm install -g jsonlint +npm install -g ibm-openapi-validator \ No newline at end of file diff --git a/script/test b/script/test index 6b6bff1..f23f532 100755 --- a/script/test +++ b/script/test @@ -3,3 +3,4 @@ set -exuo pipefail jsonlint -q api.json +lint-openapi api.json \ No newline at end of file From 8c544a50f2d250ef37aeca9a6829f333f687289a Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Mon, 28 Nov 2022 13:11:02 -0800 Subject: [PATCH 2/4] Remove .idea --- .idea/.gitignore | 8 -------- .idea/api.iml | 9 --------- .idea/misc.xml | 9 --------- .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ 5 files changed, 40 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/api.iml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/api.iml b/.idea/api.iml deleted file mode 100644 index d6ebd48..0000000 --- a/.idea/api.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index d79bd4e..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index d50cf45..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From b86f24e0d44610be749df840f473db782db28b6b Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Fri, 2 Dec 2022 12:28:02 -0800 Subject: [PATCH 3/4] Add lint rules --- .spectral.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .spectral.yaml diff --git a/.spectral.yaml b/.spectral.yaml new file mode 100644 index 0000000..2a66b10 --- /dev/null +++ b/.spectral.yaml @@ -0,0 +1,4 @@ +extends: ["spectral:oas"] +rules: + oas3-unused-component: off + operation-tags: off From 68c253990405ca5530bbe68a705607d8cefdb9e6 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Fri, 2 Dec 2022 12:28:06 -0800 Subject: [PATCH 4/4] Fix query param --- api.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.json b/api.json index 7b01b04..f9d8bd2 100644 --- a/api.json +++ b/api.json @@ -2737,7 +2737,7 @@ ] } }, - "/players/csv_export?app_id={app_id}": { + "/players/csv_export": { "post": { "operationId": "export_players", "summary": "CSV export", @@ -2745,7 +2745,7 @@ "parameters": [ { "name": "app_id", - "in": "path", + "in": "query", "required": true, "description": "The app ID that you want to export devices from", "schema": { @@ -2810,4 +2810,4 @@ } } } -} \ No newline at end of file +}