Skip to content

Conversation

@Nadegamra
Copy link
Collaborator

  • Added option to provide necessary data without having to format it into JSON in the following commands:
    • access-control member group add - --group-id and --role-ids as an alternative to --groups
    • access-control member user add - --email and --role-ids as an alternative to --members
    • imodel create - --sw-latitude, --sw-longitude, --ne-latitude, --ne-longitude as an alternative to --extent
    • imodel update - --sw-latitude, --sw-longitude, --ne-latitude, --ne-longitude as an alternative to --extent
  • Added JSON validation to multiple commands
  • imodel populate command now returns an error if --connector-type count is not equal --file count and is not 1.
  • Fixed lists of supported connectors in imodel populate and imodel connection sourcefile add commands

Nadegamra added 6 commits May 19, 2025 15:31
…' and 'imodel connection sourcefile add' commands. Added a check to 'imodel populate' for the case when connector-type count is not equal to file count or 1.
…ember group add' command. Added JSON validation for commands, that accept JSON.
@linasburneika
Copy link
Collaborator

https://blog.kellybrazil.com/2022/05/19/working-with-json-in-various-shells/

Traditional shells like Bash and Windows Command Prompt (cmd.exe) don’t have built-in JSON support and require 3rd party utilities. Newer shells like NGS, Nushell, Oil, Elvish, Murex, and PowerShell have JSON serialization/deserialization and filtering capabilities built-in for a cleaner experience.

It's not in scope of this PR, but we need to document and provide guidelines how to pass over json data through CLI commands in the most popular shells: cmd, bash, pwsh

@linasburneika
Copy link
Collaborator

There is a general issue across all the files that validateJson does not check compliance to expected schema

linasburneika
linasburneika previously approved these changes May 22, 2025
linasburneika
linasburneika previously approved these changes May 27, 2025
@Nadegamra Nadegamra merged commit 6653aa0 into main May 27, 2025
13 checks passed
@Nadegamra Nadegamra deleted the nadegamra/json-flag-alternatives branch May 27, 2025 07:18
linasburneika pushed a commit that referenced this pull request Aug 19, 2025
* Added alternative extent flags to imodel create command.

* Added alternative extent flags to imodel update command.

* Fixed connector-type options being different between 'imodel populate' and 'imodel connection sourcefile add' commands. Added a check to 'imodel populate' for the case when connector-type count is not equal to file count or 1.

* Added alternative flags for '--groups' JSON flag in 'access-control member group add' command. Added JSON validation for commands, that accept JSON.

* Added GUID CSV list validation to --role-ids flag in �ccess-control member group add command.

* Added alternative flags for '--members' JSON flag in 'access-control member user add' command.

* Re-generated documentation.

* Updated docs-generator command, so it always runs npm build before it in order to avoid errors.

* Changed endlines in some command descriptions.

* Addressed part of PR comments.

* Addressed PR comment.

* Updated documentation.

* Removed JSON validation. Will re-add it in a separate PR.

* Updated examples for 'access-control member group add' command.

* Updated 'access-control member group add' command role-ids flag to disallow providing multiple.

* Updated documentation.

* Updated documentation.
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