diff --git a/.jenkins.sh b/.jenkins.sh index b24a061fa1ac77a29232f06a9034dd755a41bbc4..448356cdee9aedf84853be89c4f39bbb1353304d 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -1,17 +1,18 @@ #!/bin/bash -specfiles=$(ls | egrep -i "^Mp1.(json|yaml)") +specfiles=$(ls | egrep "^[^.]*.(json|yaml)") fres=0 for i in $specfiles ; do - echo "-- Validating OpenAPI file $i..." - swagger-tools validate $i - res=$? - fres=$(($fres||$res)) - echo -e "-- Validator returned $res.\n" + 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 validator returns $fres." - -exit $fres +echo "-- Final validation returns $fres." +exit $fres \ No newline at end of file diff --git a/Mp1.json b/Mp1.json index 0e6efe965f5bf5bfbe23e8d348fe8538d8628844..1850af105ae9102b4127783bb8bce3312f611d40 100644 --- a/Mp1.json +++ b/Mp1.json @@ -890,7 +890,7 @@ "description": "Time to live value", "type": "integer", "format": "uint32", - "example": 300 + "example": "?" }, "DnsRule": { "description": "This type represents the general information of a DNS rule.", @@ -1144,7 +1144,13 @@ ], "properties": { "grantTypes": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" + "description": "List of supported OAuth 2.0 grant types.", + "type": "array", + "minItems": 1, + "maxItems": 4, + "items": { + "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" + } }, "tokenEndpoint": { "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" diff --git a/Mp1.yaml b/Mp1.yaml index 1f27a147f1d132c3799270525dce6a632550bc4d..eeeb600e904653574e6a3757ff4b93323149a7bf 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -835,7 +835,13 @@ components: - tokenEndpoint properties: grantTypes: - $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes' + description: >- + List of supported OAuth 2.0 grant types. + type: array + minItems: 1 + maxItems: 4 + items: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes' tokenEndpoint: $ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint' type: object