Commit a0317469 authored by Walter Featherstone's avatar Walter Featherstone
Browse files

grantTypes enum array. Updated jenkins script to use swagger-cli and speccy

parent e23acf88
Pipeline #942 passed with stage
in 0 seconds
#!/bin/bash #!/bin/bash
specfiles=$(ls | egrep -i "^Mp1.(json|yaml)") specfiles=$(ls | egrep "^[^.]*.(json|yaml)")
fres=0 fres=0
for i in $specfiles ; do for i in $specfiles ; do
echo "-- Validating OpenAPI file $i..." echo "-- Validating and linting OpenAPI file $i..."
swagger-tools validate $i swagger-cli validate "$i"
res=$? res=$?
fres=$(($fres||$res)) speccy lint "$i"
echo -e "-- Validator returned $res.\n" res2=$?
fres=$(($fres||$res||$res2))
echo "--- Validator returned $res, linter returned $res2."
done done
echo "-- Final validator returns $fres." echo "-- Final validation returns $fres."
exit $fres
exit $fres
\ No newline at end of file
...@@ -890,7 +890,7 @@ ...@@ -890,7 +890,7 @@
"description": "Time to live value", "description": "Time to live value",
"type": "integer", "type": "integer",
"format": "uint32", "format": "uint32",
"example": 300 "example": "?"
}, },
"DnsRule": { "DnsRule": {
"description": "This type represents the general information of a DNS rule.", "description": "This type represents the general information of a DNS rule.",
...@@ -1144,7 +1144,13 @@ ...@@ -1144,7 +1144,13 @@
], ],
"properties": { "properties": {
"grantTypes": { "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": { "tokenEndpoint": {
"$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint"
......
...@@ -835,7 +835,13 @@ components: ...@@ -835,7 +835,13 @@ components:
- tokenEndpoint - tokenEndpoint
properties: properties:
grantTypes: 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: tokenEndpoint:
$ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint' $ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint'
type: object type: object
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment