Commit 3b06cde8 authored by Laurent Velez's avatar Laurent Velez
Browse files

Merge branch 'stf606-final' into 'master'

Update Editor and Validation tools

See merge request !17
parents 196553e9 869ccfa7
Pipeline #11386 passed with stage
in 0 seconds
#!/bin/bash
specfiles=$(ls | egrep "^[^.]*.(json|yaml)")
fres=0
for i in $specfiles ; do
echo "-- Validating and linting OpenAPI file $i..."
swagger-cli validate "$i"
res=$?
speccy lint "$i"
res2=$?
fres=$(($fres||$res||$res2))
echo "--- Validator returned $res, linter returned $res2."
done
echo "-- Final validation returns $fres."
exit $fres
\ No newline at end of file
...@@ -43,11 +43,13 @@ ...@@ -43,11 +43,13 @@
"servers": [ "servers": [
{ {
"url": "http://127.0.0.1:8081/mec_app_support/v1", "url": "http://127.0.0.1:8081/mec_app_support/v1",
"variables": {} "variables": {
}
}, },
{ {
"url": "https://127.0.0.1:8081/mec_app_support/v1", "url": "https://127.0.0.1:8081/mec_app_support/v1",
"variables": {} "variables": {
}
} }
], ],
"paths": { "paths": {
...@@ -56,6 +58,7 @@ ...@@ -56,6 +58,7 @@
"tags": [ "tags": [
"appTrafficRules" "appTrafficRules"
], ],
"summary": "get traffic rules",
"description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.",
"operationId": "ApplicationsTrafficRules_GET", "operationId": "ApplicationsTrafficRules_GET",
"parameters": [ "parameters": [
...@@ -73,7 +76,8 @@ ...@@ -73,7 +76,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -162,7 +166,8 @@ ...@@ -162,7 +166,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -180,7 +185,8 @@ ...@@ -180,7 +185,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -191,7 +197,8 @@ ...@@ -191,7 +197,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -210,13 +217,16 @@ ...@@ -210,13 +217,16 @@
}, },
"deprecated": false "deprecated": false
}, },
"parameters": [] "parameters": [
]
}, },
"/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": {
"get": { "get": {
"tags": [ "tags": [
"appTrafficRules" "appTrafficRules"
], ],
"summary": "Get traffic rule",
"description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.",
"operationId": "ApplicationsTrafficRule_GET", "operationId": "ApplicationsTrafficRule_GET",
"parameters": [ "parameters": [
...@@ -244,7 +254,8 @@ ...@@ -244,7 +254,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -288,7 +299,8 @@ ...@@ -288,7 +299,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -306,7 +318,8 @@ ...@@ -306,7 +318,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -317,7 +330,8 @@ ...@@ -317,7 +330,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -340,6 +354,7 @@ ...@@ -340,6 +354,7 @@
"tags": [ "tags": [
"appTrafficRules" "appTrafficRules"
], ],
"summary": "Update traffic rule",
"description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.",
"operationId": "ApplicationsTrafficRule_PUT", "operationId": "ApplicationsTrafficRule_PUT",
"parameters": [ "parameters": [
...@@ -378,7 +393,8 @@ ...@@ -378,7 +393,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -422,7 +438,8 @@ ...@@ -422,7 +438,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -440,7 +457,8 @@ ...@@ -440,7 +457,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -451,7 +469,8 @@ ...@@ -451,7 +469,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -469,7 +488,8 @@ ...@@ -469,7 +488,8 @@
}, },
"412": { "412": {
"description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -488,13 +508,16 @@ ...@@ -488,13 +508,16 @@
}, },
"deprecated": false "deprecated": false
}, },
"parameters": [] "parameters": [
]
}, },
"/applications/{appInstanceId}/dns_rules": { "/applications/{appInstanceId}/dns_rules": {
"get": { "get": {
"tags": [ "tags": [
"appDnsRules" "appDnsRules"
], ],
"summary": "Get DNS rules",
"description": "This method retrieves information about all the DNS rules associated with a MEC application instance.", "description": "This method retrieves information about all the DNS rules associated with a MEC application instance.",
"operationId": "ApplicationsDnsRules_GET", "operationId": "ApplicationsDnsRules_GET",
"parameters": [ "parameters": [
...@@ -512,7 +535,8 @@ ...@@ -512,7 +535,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -570,7 +594,8 @@ ...@@ -570,7 +594,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -588,7 +613,8 @@ ...@@ -588,7 +613,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -599,7 +625,8 @@ ...@@ -599,7 +625,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -618,13 +645,16 @@ ...@@ -618,13 +645,16 @@
}, },
"deprecated": false "deprecated": false
}, },
"parameters": [] "parameters": [
]
}, },
"/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": {
"get": { "get": {
"tags": [ "tags": [
"appDnsRules" "appDnsRules"
], ],
"summary": "Get DNS rule",
"description": "This method retrieves information about a DNS rule associated with a MEC application instance.", "description": "This method retrieves information about a DNS rule associated with a MEC application instance.",
"operationId": "ApplicationsDnsRule_GET", "operationId": "ApplicationsDnsRule_GET",
"parameters": [ "parameters": [
...@@ -652,7 +682,8 @@ ...@@ -652,7 +682,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -675,7 +706,8 @@ ...@@ -675,7 +706,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -693,7 +725,8 @@ ...@@ -693,7 +725,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -704,7 +737,8 @@ ...@@ -704,7 +737,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -727,6 +761,7 @@ ...@@ -727,6 +761,7 @@
"tags": [ "tags": [
"appDnsRules" "appDnsRules"
], ],
"summary": "Update DNS rule",
"description": "This method activates, de-activates or updates a traffic rule.", "description": "This method activates, de-activates or updates a traffic rule.",
"operationId": "ApplicationsDnsRule_PUT", "operationId": "ApplicationsDnsRule_PUT",
"parameters": [ "parameters": [
...@@ -765,7 +800,8 @@ ...@@ -765,7 +800,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -788,7 +824,8 @@ ...@@ -788,7 +824,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -806,7 +843,8 @@ ...@@ -806,7 +843,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -817,7 +855,8 @@ ...@@ -817,7 +855,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -835,7 +874,8 @@ ...@@ -835,7 +874,8 @@
}, },
"412": { "412": {
"description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -854,13 +894,16 @@ ...@@ -854,13 +894,16 @@
}, },
"deprecated": false "deprecated": false
}, },
"parameters": [] "parameters": [
]
}, },
"/applications/{appInstanceId}/subscriptions": { "/applications/{appInstanceId}/subscriptions": {
"get": { "get": {
"tags": [ "tags": [
"appSubscriptions" "appSubscriptions"
], ],
"summary": "Get subscriptions",
"description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.",
"operationId": "ApplicationsSubscriptions_GET", "operationId": "ApplicationsSubscriptions_GET",
"parameters": [ "parameters": [
...@@ -878,7 +921,8 @@ ...@@ -878,7 +921,8 @@
"responses": { "responses": {
"200": { "200": {
"description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.", "description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
...@@ -889,7 +933,8 @@ ...@@ -889,7 +933,8 @@
}, },
"400": { "400": {
"description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -907,7 +952,8 @@ ...@@ -907,7 +952,8 @@
}, },
"403": { "403": {
"description": "Forbidden. The operation is not allowed given the current status of the resource.", "description": "Forbidden. The operation is not allowed given the current status of the resource.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -918,7 +964,8 @@ ...@@ -918,7 +964,8 @@
}, },
"404": { "404": {
"description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.",
"headers": {}, "headers": {
},
"content": { "content": {
"application/problem+json": { "application/problem+json": {
"schema": { "schema": {
...@@ -941,6 +988,7 @@ ...@@ -941,6 +988,7 @@
"tags": [ "tags": [
"appSubscriptions" "appSubscriptions"
], ],
"summary": "Create subscription",
"description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription.", "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription.",
"operationId": "ApplicationsSubscriptions_POST", "operationId": "ApplicationsSubscriptions_POST",
"parameters": [ "parameters": [
...@@ -993,7 +1041,8 @@ ...@@ -993,7 +1041,8 @@