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

Support files or URIs for metaschema-cli arguments #297

Closed
3 tasks
aj-stein-nist opened this issue Jan 24, 2024 · 0 comments · Fixed by #298
Closed
3 tasks

Support files or URIs for metaschema-cli arguments #297

aj-stein-nist opened this issue Jan 24, 2024 · 0 comments · Fixed by #298
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@aj-stein-nist
Copy link
Collaborator

User Story:

Placeholder

Goals:

NOTE: I have split this from its overarching work in #267 as out of scope for #241 because all commands and subcommands will have to be switched over to this approach because of the architecture for command and subcommand validation.

Dependencies:

{Describe any previous issues or related work that must be completed to start or complete this issue.}

Acceptance Criteria

  • All website and readme documentation affected by the changes in this issue have been updated. Changes to the website can be made in the docs/content directory of your branch.
  • A Pull Request (PR) is submitted that fully addresses the goals of this User Story. This issue is referenced in the PR.
  • The CI-CD build process runs without any reported errors on the PR. This can be confirmed by reviewing that all checks have passed in the PR.

{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}

@aj-stein-nist aj-stein-nist added the enhancement New feature or request label Jan 24, 2024
@aj-stein-nist aj-stein-nist self-assigned this Jan 24, 2024
aj-stein-nist added a commit to aj-stein-nist/metaschema-java that referenced this issue Jan 26, 2024
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 added a commit to aj-stein-nist/metaschema-java that referenced this issue Jan 26, 2024
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.
github-merge-queue bot pushed a commit that referenced this issue Feb 6, 2024
* Add UriUtils class for URI/Path translation

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]>

* CLI commands allow files or URIs for #297

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.

* Specific error handling for different URI failures

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]>

* Feedback: use buffered input stream for YAML URIs

* Feedback: remove infeasible UriUtilsTest cases

* Feedback: arg count check for AbstractValidateContentCommand

* Feedback: docs for UriUtils.toUri()

---------

Co-authored-by: David Waltermire <[email protected]>
@david-waltermire david-waltermire added this to the v1.0.0-M2 milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants