Skip to content

Commit

Permalink
Much simpler rule template
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrycampion committed Oct 16, 2023
1 parent f8d88f1 commit 96a339b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
45 changes: 45 additions & 0 deletions public/rule_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Authorities:
- Organization: ''
Standards:
- Name: ''
References:
- Citations:
- Cited Guidance: ''
Document: ''
Item: ''
Section: ''
Criteria:
Logical Expression:
Condition: ''
Rule: ''
Plain Language Expression: ''
Type: ''
Origin: ''
Release Notes: ''
Rule Identifier:
Id: ''
Version: ''
Validator Rule Message: ''
Version: ''
Version: ''
Check:
all:
- operator: ''
name: ''
value: ''
Core:
Status: Draft
Version: '1'
Description: ''
Executability: Fully Executable
Outcome:
Message: ''
Rule Type: Record Data
Scope:
Classes:
Include:
- ALL
Domains:
Include:
- ALL
Sensitivity: Record
8 changes: 4 additions & 4 deletions src/services/DataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ export class DataService {
};

public get_rule_template = async (): Promise<string> => {
const schema = (await this.get_rules_schema()).find(
(schema) => schema.standard === "base"
).json;
return new RuleTemplate(schema).schemaToTemplate();
const template = await fetch("/rule_template.yml").then((res) =>
res.text()
);
return template;
};

public execute_rule = async (payload: {
Expand Down

0 comments on commit 96a339b

Please sign in to comment.