-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow file or URI arguments to metaschema-cli #298
Merged
david-waltermire
merged 7 commits into
usnistgov:develop
from
aj-stein-nist:297-file-or-uri
Feb 6, 2024
Merged
Allow file or URI arguments to metaschema-cli #298
david-waltermire
merged 7 commits into
usnistgov:develop
from
aj-stein-nist:297-file-or-uri
Feb 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aj-stein-nist
force-pushed
the
297-file-or-uri
branch
from
January 26, 2024 03:43
5671dbb
to
221c463
Compare
Currently, we have the metaschema-cli only support local file paths for arguments for content inputs and outputs. This loader will support the use of MetaschemaLoader.load() with URIs and unify local file path and URL access (primarily https://, http://) with the same command line tooling for similar remote and local access. Co-Authored-By: David Waltermire <[email protected]>
This PR adjusts the commands and supporting databind classes and ports them to use URIs. The commands will use the new UriUtils class and the toUri() function to use a remote URI supported as a URL and load the model, schema, or target file. If a local file, it will convert the file path to valid URI. Integration tests have been added to validate this functionality works with the update CLI commands.
aj-stein-nist
commented
Jan 26, 2024
aj-stein-nist
commented
Jan 26, 2024
core/src/test/java/gov/nist/secauto/metaschema/core/util/UriUtilsTest.java
Outdated
Show resolved
Hide resolved
aj-stein-nist
commented
Jan 26, 2024
...i/src/main/java/gov/nist/secauto/metaschema/cli/commands/AbstractValidateContentCommand.java
Outdated
Show resolved
Hide resolved
aj-stein-nist
force-pushed
the
297-file-or-uri
branch
from
January 26, 2024 04:03
221c463
to
472dfed
Compare
8 tasks
aj-stein-nist
commented
Jan 26, 2024
databind/src/main/java/gov/nist/secauto/metaschema/databind/io/yaml/YamlOperations.java
Outdated
Show resolved
Hide resolved
Per discussion with @david-waltermire, update the exception handling and associated error messages to identify if a bad domain for a remote URI is used or a valid domain is used but a bad URL. Co-authored-by: David Waltermire <[email protected]>
aj-stein-nist
force-pushed
the
297-file-or-uri
branch
from
January 26, 2024 17:36
8297c6c
to
7957c6d
Compare
@david-waltermire integrated all changes from ad-hoc pairing and review. This is ready for final review and possible merge if you are happy with it. |
david-waltermire
approved these changes
Feb 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. Thanks so much!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Committer Notes
Closes #297.
All Submissions:
Have you squashed any non-relevant commits and commit messages? [instructions]Leaving for final review, to be squashed or rebased on merge.Changes to Core Features:
Have you updated all website](https://pages.nist.gov/metaschema) and readme documentation affected by the changes you made? Changes to the website can be made in the website/content directory of your branch.