Skip to content

Commit

Permalink
update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed May 25, 2024
1 parent e88fca3 commit e99fa0c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
5 changes: 4 additions & 1 deletion tests/data/expected_json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
},
"test2": {
"title": "Test2",
"$ref": "#/definitions/Test2",
"type": "array",
"items": {
"$ref": "#/definitions/Test2"
},
"term": "schema:something"
}
},
Expand Down
53 changes: 37 additions & 16 deletions tests/data/expected_sdrdm_schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"name": "Test",
"config": {
"id-field": true,
"prefixes": {
"schema": "http://schema.org/"
},
"nsmap": {
"tst": "http://example.com/test/"
}
},
"objects": [
{
"name": "Test",
Expand All @@ -20,7 +11,11 @@
"docstring": "",
"options": [],
"term": "schema:hello",
"required": true
"required": true,
"xml": {
"is_attr": true,
"name": "name"
}
},
{
"name": "number",
Expand All @@ -29,16 +24,24 @@
"docstring": "",
"options": [],
"term": "schema:one",
"required": false
"required": false,
"xml": {
"is_attr": true,
"name": "number"
}
},
{
"name": "test2",
"multiple": false,
"multiple": true,
"dtypes": ["Test2"],
"docstring": "",
"options": [],
"term": "schema:something",
"required": false
"required": false,
"xml": {
"is_attr": false,
"name": "SomeTest2"
}
}
],
"docstring": "",
Expand All @@ -54,7 +57,11 @@
"docstring": "",
"options": [],
"term": "schema:hello",
"required": false
"required": false,
"xml": {
"is_attr": false,
"name": "name"
}
},
{
"name": "number",
Expand All @@ -63,11 +70,25 @@
"docstring": "",
"options": [],
"term": "schema:one",
"required": false
"required": false,
"xml": {
"is_attr": true,
"name": "number"
}
}
],
"docstring": "",
"object_type": "Object"
}
]
],
"config": {
"id-field": true,
"prefixes": {
"schema": "http://schema.org/"
},
"nsmap": {
"tst": "http://example.com/test/"
},
"repo": "https://www.github.com/my/repo"
}
}
8 changes: 7 additions & 1 deletion tests/data/model.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
id-field: true
repo: "https://www.github.com/my/repo"
prefixes:
schema: http://schema.org/
nsmap:
Expand All @@ -15,18 +16,23 @@ nsmap:
- __name__
- Type: string
- Term: schema:hello
- XML: @name
- number
- Type: float
- Term: schema:one
- XML: @number
- test2
- Type: Test2
- Type: Test2[]
- Term: schema:something
- XML: SomeTest2

### Test2

- names
- Type: string[]
- Term: schema:hello
- XML: name
- number
- Type: float
- Term: schema:one
- XML: @number

0 comments on commit e99fa0c

Please sign in to comment.