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

Validate command #145

Merged
merged 13 commits into from
Jan 22, 2022
Merged

Validate command #145

merged 13 commits into from
Jan 22, 2022

Conversation

mhuang74
Copy link
Contributor

@mhuang74 mhuang74 commented Jan 19, 2022

@jqnatividad Here's my POC for validate command (#46):

  • able to load and compile json schema from path or url
  • able to convert CSV to json instance according to schema
  • able to validate json instance against json schema
  • able to separate input to valid and invalid files
  • able to output validation errors as jsonl to error report
     Running unittests (target/debug/deps/qsvlite-997a7c46d821987a)

running 5 tests
test cmd::validate::tests_for_csv_to_json_conversion::test_to_json_instance ... ok
test cmd::validate::tests_for_csv_to_json_conversion::test_to_json_instance_cast_integer_error ... ok
test cmd::validate::tests_for_schema_validation::test_validate_with_no_errors ... ok
test cmd::validate::tests_for_schema_validation::test_validate_with_error ... ok
test cmd::validate::test_load_json_via_url ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 7 filtered out; finished in 0.27s

     Running tests/tests.rs (target/debug/deps/tests-ad74d5d5f50cafa1)

running 3 tests
test test_validate::validate_good_csv ... ok
test test_validate::validate_bad_csv ... ok
test test_validate::validate_with_json_schema ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 624 filtered out; finished in 0.06s

@mhuang74 mhuang74 mentioned this pull request Jan 19, 2022
@mhuang74 mhuang74 changed the title POC: Validate command Validate command Jan 22, 2022
@jqnatividad jqnatividad merged commit c307d10 into jqnatividad:master Jan 22, 2022
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.

None yet

2 participants