Skip to content

Commit

Permalink
Merge pull request #102 from center-for-threat-informed-defense/AF-14…
Browse files Browse the repository at this point in the history
…6_remove_schema_from_format

AF-146 Remove application schema from file format
  • Loading branch information
mikecarenzo committed Aug 23, 2023
2 parents c3a34f7 + 71d3eba commit 597d5f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/attack_flow_builder/src/store/PageEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class PageEditor {
let page = JSON.parse(file) as PageExport;

// Initialize diagram factory
let factory = await DiagramFactory.create(page.schema);
let factory = await DiagramFactory.create(Configuration.schema);

// Compile export index
let index = new Map<string, DiagramObjectExport>();
Expand Down Expand Up @@ -306,7 +306,6 @@ export class PageEditor {
let doc: PageExport = {
version: pkg.version,
id: this.page.id,
schema: this.page.factory.getSchema(),
objects: [...this.page.getSubtree()].map(o => o.toExport()),
location: location
}
Expand Down Expand Up @@ -393,8 +392,11 @@ type PageExport = {

/**
* The page's internal schema.
* @deprecated
* Since version 2.1.0. Schemas now rest solely with the application and
* are no longer exported with each file.
*/
schema: BlockDiagramSchema
schema?: BlockDiagramSchema

/**
* The page's diagram objects.
Expand Down

0 comments on commit 597d5f3

Please sign in to comment.