Skip to content

Commit

Permalink
fix: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Feb 23, 2024
2 parents ae79613 + 667c49e commit ac452e2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
8 changes: 1 addition & 7 deletions schema/core/reusable/object_storage_container_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,5 @@
"description": "Unix timestamp showing when the file was last modified",
"type": "string"
}
},
"required": [
"CONTAINER",
"NAME",
"PROVIDER",
"REGION"
]
}
}
3 changes: 2 additions & 1 deletion schema/workflow/unit/io/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"required": [
"endpoint",
"endpoint_options"
]
],
"additionalProperties": true
}
6 changes: 4 additions & 2 deletions schema/workflow/unit/io/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"required": [
"ids"
]
],
"additionalProperties": true
},
{
"properties": {
Expand All @@ -33,7 +34,8 @@
"required": [
"collection",
"draft"
]
],
"additionalProperties": true
}
]
}
6 changes: 3 additions & 3 deletions schema/workflow/unit/io/object_storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
},
"required": [
"objectData",
"basename"
]
"objectData"
],
"additionalProperties": true
}
6 changes: 5 additions & 1 deletion src/py/mat3ra/esse/data/schemas.py

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions tests/js/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,24 @@ describe("schema titles must be unique or empty", () => {
// eslint-disable-next-line no-unused-expressions
expect(repeatedSchemaTitles).to.be.an("array").that.is.empty;
});

describe("default", () => {
JSONSchemasInterface.setSchemaFolder(schemasPath);
const schema = JSONSchemasInterface.getSchemaById("job/compute");
const example = JSON.parse(
fs.readFileSync(path.join(examplesPath, "job/compute.json")).toString(),
) as object;
if (schema) {
// @ts-ignore
const { arguments: args, ...restExample } = example;
console.log({
restExample,
args,
});
ajv.validate(restExample, schema);
console.log({
restExample,
example,
});
}
});

0 comments on commit ac452e2

Please sign in to comment.