Skip to content

Commit fbf8f72

Browse files
authored
Merge pull request #20 from Exabyte-io/update/SOF-6123
SOF-6123: path-like schema IDs
2 parents 4ce829a + 00b9a0b commit fbf8f72

File tree

4 files changed

+38
-37
lines changed

4 files changed

+38
-37
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@babel/preset-react": "7.16.7",
4949
"@babel/register": "^7.16.0",
5050
"@babel/runtime-corejs3": "7.16.8",
51-
"@exabyte-io/esse.js": "2022.8.23-0",
51+
"@exabyte-io/esse.js": "2022.9.6-0",
5252
"crypto-js": "^4.1.1",
5353
"json-schema-merge-allof": "^0.8.1",
5454
"lodash": "^4.17.21",

src/utils/schemas.js

+32-32
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,57 @@ import { JSONSchemasInterface } from "../JSONSchemasInterface";
22

33
export const baseSchemas = {
44
Material: "material",
5-
Entity: "system-entity",
5+
Entity: "system/entity",
66
BankMaterial: "material",
77
Workflow: "workflow",
8-
Subworkflow: "workflow-subworkflow",
8+
Subworkflow: "workflow/subworkflow",
99
BankWorkflow: "workflow",
1010
Job: "job",
11-
Application: "software-application",
12-
Executable: "software-executable",
13-
Flavor: "software-flavor",
14-
Template: "software-template",
15-
AssertionUnit: "workflow-unit-assertion",
16-
AssignmentUnit: "workflow-unit-assignment",
17-
ConditionUnit: "workflow-unit-condition",
18-
ExecutionUnit: "workflow-unit-execution",
19-
IOUnit: "workflow-unit-io",
20-
MapUnit: "workflow-unit-map",
21-
ProcessingUnit: "workflow-unit-processing",
22-
ReduceUnit: "workflow-unit-reduce",
23-
SubworkflowUnit: "workflow-unit",
24-
Unit: "workflow-unit",
11+
Application: "software/application",
12+
Executable: "software/executable",
13+
Flavor: "software/flavor",
14+
Template: "software/template",
15+
AssertionUnit: "workflow/unit/assertion",
16+
AssignmentUnit: "workflow/unit/assignment",
17+
ConditionUnit: "workflow/unit/condition",
18+
ExecutionUnit: "workflow/unit/execution",
19+
IOUnit: "workflow/unit/io",
20+
MapUnit: "workflow/unit/map",
21+
ProcessingUnit: "workflow/unit/processing",
22+
ReduceUnit: "workflow/unit/reduce",
23+
SubworkflowUnit: "workflow/unit",
24+
Unit: "workflow/unit",
2525
};
2626

2727
export const entityMix = [
28-
"system-description-object",
29-
"system-base-entity-set",
30-
"system-sharing",
31-
"system-metadata",
32-
"system-defaultable",
28+
"system/description-object",
29+
"system/base-entity-set",
30+
"system/sharing",
31+
"system/metadata",
32+
"system/defaultable",
3333
];
3434

35-
export const subWorkflowMix = ["system-system-name", "system-is-multi-material"];
35+
export const subWorkflowMix = ["system/system-name", "system/is-multi-material"];
3636

37-
export const workflowMix = ["workflow-base-flow", "system-history", "system-is-outdated"];
37+
export const workflowMix = ["workflow/base-flow", "system/history", "system/is-outdated"];
3838

39-
export const bankMaterialMix = ["material-conventional", "system-creator-account"];
39+
export const bankMaterialMix = ["material/conventional", "system/creator-account"];
4040

41-
export const bankWorkflowMix = ["system-creator-account"];
41+
export const bankWorkflowMix = ["system/creator-account"];
4242

43-
export const jobMix = ["system-status", "system-job-extended"];
43+
export const jobMix = ["system/status", "system/job-extended"];
4444

4545
export const unitMix = [
46-
"system-unit-extended",
47-
"system-status",
48-
"workflow-unit-runtime-runtime-items",
46+
"system/unit-extended",
47+
"system/status",
48+
"workflow/unit/runtime/runtime-items",
4949
];
5050

51-
export const assignmentUnitMix = ["system-scope"];
51+
export const assignmentUnitMix = ["system/scope"];
5252

53-
export const flavorMix = ["system-is-multi-material"];
53+
export const flavorMix = ["system/is-multi-material"];
5454

55-
export const systemEntityMix = ["system-entity"];
55+
export const systemEntityMix = ["system/entity"];
5656

5757
export const mixSchemas = {
5858
Entity: [...entityMix],

tests/in_memory.tests.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-classes-per-file */
12
import { expect } from "chai";
23

34
import { InMemoryEntity } from "../src/entity/in_memory";
@@ -73,7 +74,7 @@ describe("InMemoryEntity", () => {
7374
}
7475
}
7576

76-
registerClassName(RegisteredEntity.name, "system-entity", entityMix);
77+
registerClassName(RegisteredEntity.name, "system/entity", entityMix);
7778

7879
expect(RegisteredEntity.jsonSchema).to.be.an("object");
7980
expect(RegisteredEntity.jsonSchema).to.have.nested.property("properties.isDefault"); // check mix schemas

0 commit comments

Comments
 (0)