66
77(deftest api-descriptor-resource-path-test
88 (is (= " computesoftware/api-descriptors/compute/v1/api-descriptor.edn"
9- (descriptor/api-descriptor-resource-path :compute " v1" ))))
9+ (descriptor/api-descriptor-resource-path :compute " v1" ))))
10+
11+
12+ (deftest recursive-schema
13+ (is (= {" nonref" {" type" " object" }
14+
15+ " TableSchema"
16+ {" type" " object"
17+ " properties" {" fields" {" items" {" type" " object"
18+ " properties"
19+ {" fields"
20+ {" items"
21+ {" $ref" " TableFieldSchema"
22+ :compute.gcp.descriptor/recursive?
23+ true }
24+ " type" " array" }}
25+ " id" " TableFieldSchema" }
26+ " type" " array" }
27+ " fields2" {" items" {" type" " object" }, " type" " array" }
28+ " fields3" {" items" {" type" " object" }, " type" " array" }}
29+ " id" " TableSchema" }
30+ " TableFieldSchema"
31+ {" type" " object"
32+ " properties" {" fields" {" items" {" type" " object"
33+ " properties" {" fields" {" items" {" $ref" " TableFieldSchema"
34+ :compute.gcp.descriptor/recursive?
35+ true }
36+ " type" " array" }},
37+ " id" " TableFieldSchema" }
38+ " type" " array" }}
39+ " id" " TableFieldSchema" }}
40+ (-> (descriptor/resolve-descriptor-refs
41+ {:compute.gcp.descriptor/schemas
42+ {" nonref" {" type" " object" }
43+ " TableSchema" {" type" " object" ,
44+ " properties" {" fields" {" items" {" $ref" " TableFieldSchema" },
45+ " type" " array" }
46+ " fields2" {" items" {" $ref" " nonref" },
47+ " type" " array" }
48+ " fields3" {" items" {" $ref" " nonref" },
49+ " type" " array" }},
50+ " id" " TableSchema" }
51+ " TableFieldSchema" {" type" " object" ,
52+ " properties" {" fields" {" items" {" $ref" " TableFieldSchema" },
53+ " type" " array" }}
54+ " id" " TableFieldSchema" }}})
55+ :compute.gcp.descriptor/schemas ))))
56+
0 commit comments