From 15814b410387f3a7c8827b67520a37c21b1e6e26 Mon Sep 17 00:00:00 2001 From: Kailash Adhikari Date: Thu, 29 Sep 2022 16:07:30 +0530 Subject: [PATCH] postman collection version upgrade,open API bug fixes and jenkins changes --- Jenkinsfile | 6 +++--- docs/openapi.yaml | 11 +++++------ ...son => IUDX_GIS_Server_APIs_V4.0.environment.json} | 0 ...IUDX_GIS_Server_APIs_V4.0.postman_collection.json} | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) rename src/test/resources/{IUDX_GIS_Server_APIs_V3.5.environment.json => IUDX_GIS_Server_APIs_V4.0.environment.json} (100%) rename src/test/resources/{IUDX_GIS_Server_APIs_V3.5.postman_collection.json => IUDX_GIS_Server_APIs_V4.0.postman_collection.json} (99%) diff --git a/Jenkinsfile b/Jenkinsfile index 2301b34..475b806 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ pipeline { stage('Run GIS interface server'){ steps{ script{ - sh 'scp src/test/resources/IUDX_GIS_Server_APIs_V3.5.postman_collection.json jenkins@jenkins-master:/var/lib/jenkins/iudx/gis/Newman/' + sh 'scp src/test/resources/IUDX_GIS_Server_APIs_V4.0.postman_collection.json jenkins@jenkins-master:/var/lib/jenkins/iudx/gis/Newman/' sh 'docker-compose -f docker-compose.test.yml up -d integTest' sh 'sleep 45' } @@ -67,7 +67,7 @@ pipeline { script{ startZap ([host: 'localhost', port: 8090, zapHome: '/var/lib/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/OWASP_ZAP/ZAP_2.11.0']) sh 'curl http://127.0.0.1:8090/JSON/pscan/action/disableScanners/?ids=10096' - sh 'HTTP_PROXY=\'127.0.0.1:8090\' newman run /var/lib/jenkins/iudx/gis/Newman/IUDX_GIS_Server_APIs_V3.5.postman_collection.json -e /home/ubuntu/configs/gis-postman-env.json --insecure -r htmlextra --reporter-htmlextra-export /var/lib/jenkins/iudx/gis/Newman/report/report.html --reporter-htmlextra-skipSensitiveData' + sh 'HTTP_PROXY=\'127.0.0.1:8090\' newman run /var/lib/jenkins/iudx/gis/Newman/IUDX_GIS_Server_APIs_V4.0.postman_collection.json -e /home/ubuntu/configs/gis-postman-env.json --insecure -r htmlextra --reporter-htmlextra-export /var/lib/jenkins/iudx/gis/Newman/report/report.html --reporter-htmlextra-skipSensitiveData' runZapAttack() } } @@ -130,7 +130,7 @@ pipeline { // steps { // node('master') { // script{ - // sh 'newman run /var/lib/jenkins/iudx/gis/Newman/IUDX_GIS_Server_APIs_V3.5.postman_collection.json -e /home/ubuntu/configs/cd/gis-postman-env.json --insecure -r htmlextra --reporter-htmlextra-export /var/lib/jenkins/iudx/gis/Newman/report/cd-report.html --reporter-htmlextra-skipSensitiveData' + // sh 'newman run /var/lib/jenkins/iudx/gis/Newman/IUDX_GIS_Server_APIs_V4.0.postman_collection.json -e /home/ubuntu/configs/cd/gis-postman-env.json --insecure -r htmlextra --reporter-htmlextra-export /var/lib/jenkins/iudx/gis/Newman/report/cd-report.html --reporter-htmlextra-skipSensitiveData' // } // } // } diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 3688cce..787f9ea 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -48,7 +48,7 @@ tags: paths: - /ngsi-ld/v1/entities/{id}: + /ngsi-ld/v1/entities: get: tags: - Latest Search @@ -65,7 +65,7 @@ paths: pattern: '^[a-zA-Z0-9\/\@\.]*$' - name: id - in: path + in: query description: A valid IUDX ID of the resource. required: true schema: @@ -99,7 +99,7 @@ paths: description: | - This API is used to get the data of a resource.
It uses the IUDX ID a.k.a `id` to query the resource server.
To get data a valid IUDX Auth token is mandatory.
The `/entities` end point followed by `id` as a path parameter is used to get the latest data. + This API is used to get the data of a resource.
It uses the IUDX ID a.k.a `id` to query the resource server.
To get data a valid IUDX Auth token is mandatory.
The `/entities` end point followed by `id` as a query parameter is used to get the latest data. /admin/gis/serverInfo: post: @@ -206,7 +206,6 @@ paths: description: | Put Admin API allows an admin to update the GIS info present. Based on the input provided, the API validates the access control of the user with IUDX Auth server to allow or deny access to the API. - /admin/gis/serverInfo/{id}: delete: tags: - Admin API @@ -224,7 +223,7 @@ paths: pattern: '^[a-zA-Z0-9\/\@\.]*$' - name: id - in: path + in: query description: 'id of the Gis information.' required: true style: simple @@ -255,7 +254,7 @@ paths: description: | Delete admin API allows an admin to delete Gis information. Based on the input provided, the API validates the access control of the user with IUDX Auth server to allow or deny access to the API. - + components: schemas: diff --git a/src/test/resources/IUDX_GIS_Server_APIs_V3.5.environment.json b/src/test/resources/IUDX_GIS_Server_APIs_V4.0.environment.json similarity index 100% rename from src/test/resources/IUDX_GIS_Server_APIs_V3.5.environment.json rename to src/test/resources/IUDX_GIS_Server_APIs_V4.0.environment.json diff --git a/src/test/resources/IUDX_GIS_Server_APIs_V3.5.postman_collection.json b/src/test/resources/IUDX_GIS_Server_APIs_V4.0.postman_collection.json similarity index 99% rename from src/test/resources/IUDX_GIS_Server_APIs_V3.5.postman_collection.json rename to src/test/resources/IUDX_GIS_Server_APIs_V4.0.postman_collection.json index 48805ef..0c74dbf 100644 --- a/src/test/resources/IUDX_GIS_Server_APIs_V3.5.postman_collection.json +++ b/src/test/resources/IUDX_GIS_Server_APIs_V4.0.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "dbcaeba2-bf6a-484b-95cd-0c7aee3231c1", - "name": "IUDX-GIS-SERVER-APIs-V3.5", + "name": "IUDX-GIS-SERVER-APIs-V4.0", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [