`jsonInputArg` should allow for positional parameter
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
Currently, if your exe takes args as:
myResource <operation> <json>
Then jsonInputArg won't work. If you set it to empty string, then a literal empty string gets passed:
myResource get "" '{}'
Proposed technical implementation details (optional)
In the dsc.resource.json, if jsonInputArg is an empty string, then no arg should be passed and the json is just passed as a positional argument. I don't think there's a valid use case where the author wants an empty string passed along with the JSON (although the JSON could itself be empty).
This was found developing my C# example.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with issue #796 and trace the Rust handling of jsonInputArg in dsc.resource.json, using the described C# example to understand the positional-argument form. Done means an empty jsonInputArg causes no empty argument to be emitted and the JSON is passed positionally; verify this behavior with the existing test coverage if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100