Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add schema validator interface and implementation #44

Merged
merged 11 commits into from
Jul 7, 2021

Conversation

codemonkeyhhq
Copy link
Collaborator

expose api for schema validation use

@ghost
Copy link

ghost commented Jun 16, 2021

CLA assistant check
All CLA requirements met.


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344


In reply to: 862609344

@codemonkeyhhq codemonkeyhhq marked this pull request as ready for review June 18, 2021 16:08
Copy link
Member

@TravisOnGit TravisOnGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

… method, remove all apis that don't take rules input and fix tests
treeSchemas = new Dictionary<string, ForgeTree>();
treeSchemas.Add("tree1", treeSchema);
treeSchemas.Add("tree2", treeSchema);
treeSchemas.Add("tree3", treeSchema);
Copy link
Member

@TravisOnGit TravisOnGit Jul 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename these:
treeSchema -> forgeTree
treeSchemas -> forgeTreeDictionary #Closed

public void TestInitialize()
{
forgeTreeFromPath = Path.Combine(Environment.CurrentDirectory, "test\\ExampleSchemas\\TardigradeSchema.json");
schemaDirectoryPath = Path.Combine(Environment.CurrentDirectory, "test\\ExampleSchemas");
Copy link
Member

@TravisOnGit TravisOnGit Jul 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schemaDirectoryPath

directoryPathToMultipleForgeTree #Closed

forgeTreeFromPath = Path.Combine(Environment.CurrentDirectory, "test\\ExampleSchemas\\TardigradeSchema.json");
schemaDirectoryPath = Path.Combine(Environment.CurrentDirectory, "test\\ExampleSchemas");
stringRules = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "contracts\\ForgeSchemaValidationRules.json"));
rulesForDictionary = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "contracts\\ForgeSchemaDictionaryValidationRules.json"));
Copy link
Member

@TravisOnGit TravisOnGit Jul 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rulesForDictionary

rulesForForgeTreeDictionary #Closed

schemaDirectoryPath = Path.Combine(Environment.CurrentDirectory, "test\\ExampleSchemas");
stringRules = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "contracts\\ForgeSchemaValidationRules.json"));
rulesForDictionary = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "contracts\\ForgeSchemaDictionaryValidationRules.json"));
linkedRulesForDictionary = ForgeSchemaValidator.GetLinkedJSchemaRules(rulesForDictionary, stringRules, "//ForgeSchemaValidationRules.json");
Copy link
Member

@TravisOnGit TravisOnGit Jul 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linkedRulesForDictionary

linkedRulesForForgeTreeDictionary #Closed

Copy link
Member

@TravisOnGit TravisOnGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@codemonkeyhhq codemonkeyhhq merged commit d12ed9c into master Jul 7, 2021
@codemonkeyhhq codemonkeyhhq deleted the feature/haoqihuang/addSchemaValidationAPI branch July 7, 2021 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants