File tree Expand file tree Collapse file tree 3 files changed +64
-10
lines changed Expand file tree Collapse file tree 3 files changed +64
-10
lines changed Original file line number Diff line number Diff line change 1
- # N.B.: this example is used in a test that needs a file without $base,
2
- # so please do not include $base here.
3
- - name : Basket
4
- doc : A basket of products.
5
- type : record
6
- documentRoot : true
7
- fields :
8
- product : string
9
- price : float
1
+ basket :
2
+ - product : bananas
3
+ price : 0.39
4
+ per : pound
5
+ weight : 1
6
+ - product : cucumbers
7
+ price : 0.79
8
+ per : item
9
+ count : 3
Original file line number Diff line number Diff line change
1
+ # N.B.: this example is used in a test that needs a file without $base,
2
+ # so please do not include $base here.
3
+ - name : Product
4
+ doc : |
5
+ The base type for a product. This is an abstract type, so it
6
+ can't be used directly, but can be used to define other types.
7
+ type : record
8
+ abstract : true
9
+ fields :
10
+ product : string
11
+ price : float
12
+
13
+ - name : ByWeight
14
+ doc : |
15
+ A product, sold by weight. Products may be sold by pound or by
16
+ kilogram. Weights may be fractional.
17
+ type : record
18
+ extends : Product
19
+ fields :
20
+ per :
21
+ type :
22
+ type : enum
23
+ symbols :
24
+ - pound
25
+ - kilogram
26
+ jsonldPredicate : " #per"
27
+ weight : float
28
+
29
+ - name : ByCount
30
+ doc : |
31
+ A product, sold by count. The count must be a integer value.
32
+ type : record
33
+ extends : Product
34
+ fields :
35
+ per :
36
+ type :
37
+ type : enum
38
+ symbols :
39
+ - item
40
+ jsonldPredicate : " #per"
41
+ count : int
42
+
43
+ - name : Basket
44
+ doc : |
45
+ A basket of products. The 'documentRoot' field indicates it is a
46
+ valid starting point for a document. The 'basket' field will
47
+ validate subtypes of 'Product' (ByWeight and ByCount).
48
+ type : record
49
+ documentRoot : true
50
+ fields :
51
+ basket :
52
+ type :
53
+ type : array
54
+ items : Product
Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ def get_data_uri(resource_path: str) -> str:
40
40
41
41
cwl_file_uri = get_data_uri ("tests/test_schema/CommonWorkflowLanguage.yml" )
42
42
metaschema_file_uri = get_data_uri ("metaschema/metaschema.yml" )
43
- basket_file_uri = get_data_uri ("basket .yml" )
43
+ basket_file_uri = get_data_uri ("tests/basket_schema .yml" )
You can’t perform that action at this time.
0 commit comments