Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c3e8d77f0e
|
@@ -9,10 +9,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Validate JSON
|
||||
- name: Validate Renovate Config
|
||||
uses: ./
|
||||
with:
|
||||
json-file: renovate.json
|
||||
- name: Validate oxfmt config
|
||||
uses: ./
|
||||
with:
|
||||
json-file: .oxfmtrc.json
|
||||
|
||||
test:
|
||||
name: Test
|
||||
|
||||
Vendored
+1
-1
@@ -22228,7 +22228,7 @@ const validateJson = async (jsonFileContent) => {
|
||||
const schemaUrl = new URL(schema);
|
||||
const schemaText = await (await fetch(schemaUrl.toString())).text();
|
||||
const schemaObject = JSON.parse(schemaText);
|
||||
const validator = new import_ajv.default();
|
||||
const validator = new import_ajv.default({ strict: false });
|
||||
if (!validator.compile(schemaObject)(jsonObject)) throw new Error(`JSON file is not valid: ${validator.errorsText()}`);
|
||||
};
|
||||
//#endregion
|
||||
|
||||
+3
-1
@@ -14,7 +14,9 @@ export const validateJson = async (jsonFileContent: string): Promise<void> => {
|
||||
const schemaText = await schemaContent.text();
|
||||
const schemaObject = JSON.parse(schemaText);
|
||||
|
||||
const validator = new Ajv();
|
||||
const validator = new Ajv({
|
||||
strict: false,
|
||||
});
|
||||
const validate = validator.compile(schemaObject);
|
||||
const isValid = validate(jsonObject);
|
||||
if (!isValid) {
|
||||
|
||||
Reference in New Issue
Block a user