Skip to content

Commit dabbcee

Browse files
add format checks to these strings
/info/termsOfService: https://spec.openapis.org/oas/v3.1.0#fixed-fields-0 /contact/url, email : https://spec.openapis.org/oas/v3.1.0#fixed-fields-1 implicit/authorizationUrl: https://spec.openapis.org/oas/v3.1.0#fixed-fields-24 authorizationUrl, tokenUrl, refreshUrl: https://spec.openapis.org/oas/v3.1.0#fixed-fields-24
1 parent 42c153c commit dabbcee

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

schemas/v3.1/schema.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"type": "string"
8888
},
8989
"termsOfService": {
90-
"type": "string"
90+
"type": "string",
91+
"format": "uri"
9192
},
9293
"contact": {
9394
"$ref": "#/$defs/contact"
@@ -114,10 +115,12 @@
114115
"type": "string"
115116
},
116117
"url": {
117-
"type": "string"
118+
"type": "string",
119+
"format": "uri"
118120
},
119121
"email": {
120-
"type": "string"
122+
"type": "string",
123+
"format": "email"
121124
}
122125
},
123126
"$ref": "#/$defs/specification-extensions",
@@ -1284,10 +1287,12 @@
12841287
"type": "object",
12851288
"properties": {
12861289
"authorizationUrl": {
1287-
"type": "string"
1290+
"type": "string",
1291+
"format": "uri"
12881292
},
12891293
"refreshUrl": {
1290-
"type": "string"
1294+
"type": "string",
1295+
"format": "uri"
12911296
},
12921297
"scopes": {
12931298
"$ref": "#/$defs/map-of-strings"
@@ -1304,10 +1309,12 @@
13041309
"type": "object",
13051310
"properties": {
13061311
"tokenUrl": {
1307-
"type": "string"
1312+
"type": "string",
1313+
"format": "uri"
13081314
},
13091315
"refreshUrl": {
1310-
"type": "string"
1316+
"type": "string",
1317+
"format": "uri"
13111318
},
13121319
"scopes": {
13131320
"$ref": "#/$defs/map-of-strings"
@@ -1324,10 +1331,12 @@
13241331
"type": "object",
13251332
"properties": {
13261333
"tokenUrl": {
1327-
"type": "string"
1334+
"type": "string",
1335+
"format": "uri"
13281336
},
13291337
"refreshUrl": {
1330-
"type": "string"
1338+
"type": "string",
1339+
"format": "uri"
13311340
},
13321341
"scopes": {
13331342
"$ref": "#/$defs/map-of-strings"
@@ -1344,13 +1353,16 @@
13441353
"type": "object",
13451354
"properties": {
13461355
"authorizationUrl": {
1347-
"type": "string"
1356+
"type": "string",
1357+
"format": "uri"
13481358
},
13491359
"tokenUrl": {
1350-
"type": "string"
1360+
"type": "string",
1361+
"format": "uri"
13511362
},
13521363
"refreshUrl": {
1353-
"type": "string"
1364+
"type": "string",
1365+
"format": "uri"
13541366
},
13551367
"scopes": {
13561368
"$ref": "#/$defs/map-of-strings"

schemas/v3.1/schema.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ $defs:
6060
type: string
6161
termsOfService:
6262
type: string
63+
format: uri
6364
contact:
6465
$ref: '#/$defs/contact'
6566
license:
@@ -80,8 +81,10 @@ $defs:
8081
type: string
8182
url:
8283
type: string
84+
format: uri
8385
email:
8486
type: string
87+
format: email
8588
$ref: '#/$defs/specification-extensions'
8689
unevaluatedProperties: false
8790

@@ -879,8 +882,10 @@ $defs:
879882
properties:
880883
authorizationUrl:
881884
type: string
885+
format: uri
882886
refreshUrl:
883887
type: string
888+
format: uri
884889
scopes:
885890
$ref: '#/$defs/map-of-strings'
886891
required:
@@ -894,8 +899,10 @@ $defs:
894899
properties:
895900
tokenUrl:
896901
type: string
902+
format: uri
897903
refreshUrl:
898904
type: string
905+
format: uri
899906
scopes:
900907
$ref: '#/$defs/map-of-strings'
901908
required:
@@ -909,8 +916,10 @@ $defs:
909916
properties:
910917
tokenUrl:
911918
type: string
919+
format: uri
912920
refreshUrl:
913921
type: string
922+
format: uri
914923
scopes:
915924
$ref: '#/$defs/map-of-strings'
916925
required:
@@ -924,10 +933,13 @@ $defs:
924933
properties:
925934
authorizationUrl:
926935
type: string
936+
format: uri
927937
tokenUrl:
928938
type: string
939+
format: uri
929940
refreshUrl:
930941
type: string
942+
format: uri
931943
scopes:
932944
$ref: '#/$defs/map-of-strings'
933945
required:

0 commit comments

Comments
 (0)