Skip to content

Commit c3950bd

Browse files
authored
Validatejson (#6)
2 parents f912702 + a44cb61 commit c3950bd

3 files changed

Lines changed: 43 additions & 3 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: validate-json-schemas
2+
on:
3+
pull_request:
4+
5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
9+
jobs:
10+
validate-adventureworks:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: validate-adventureworks-product
16+
id: validate-adventureworks-product
17+
uses: GrantBirki/json-yaml-validate@v3.3.0
18+
with:
19+
comment: "true"
20+
use_gitignore: "false"
21+
json_schema: "./AdventureWorks/.json-schemas/products.schema"
22+
files: "./AdventureWorks/Product.json"
23+
24+
- name: validate-adventureworks-template
25+
id: validate-adventureworks-template
26+
uses: GrantBirki/json-yaml-validate@v3.3.0
27+
with:
28+
comment: "true"
29+
use_gitignore: "false"
30+
json_schema: "./AdventureWorks/.json-schemas/templates.schema"
31+
files: "./AdventureWorks/Templates/AdventureWorks/Template.json"
32+
33+
- name: validate-adventureworks-tables
34+
id: validate-adventureworks-tables
35+
uses: GrantBirki/json-yaml-validate@v3.3.0
36+
with:
37+
comment: "true"
38+
use_gitignore: "false"
39+
json_schema: "./AdventureWorks/.json-schemas/tables.schema"
40+
base_dir: "./AdventureWorks/Templates/AdventureWorks/Tables"
41+

AdventureWorks/.json-schemas/tables.schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"Name": {
110110
"type": "string"
111111
},
112-
"IsPromary": {
112+
"IsPrimary": {
113113
"type": "boolean"
114114
},
115115
"Column": {

AdventureWorks/.json-schemas/templates.schema

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"additionalProperties": false,
1818
"required": [
1919
"Name",
20-
"DatabaseIdentificationScript",
21-
"ServerToQuench"
20+
"DatabaseIdentificationScript"
2221
]
2322
}

0 commit comments

Comments
 (0)