-
Notifications
You must be signed in to change notification settings - Fork 72
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
initial cut of CLI generation #349
Conversation
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.
woohoo!!!! 🎉 Thanks for working on this!
} | ||
}); | ||
|
||
// TODO parameter for body as input json (--body-input?) |
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.
Do we anticipate customers requiring JSON input in the first iteration of the CLI? If not maybe we can punt this for later if it's needed?
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.
I suspect we need it in the first iteration of the CLI at least as much as the customer would.
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.
it'd be necessary for the $ oxide api
command, not so much for the others imo
}); | ||
|
||
// TODO parameter for body as input json (--body-input?) | ||
// TODO parameter to output a body template (--body-template?) |
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.
By body template do you mean a table?
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.
I'd like to have a parameter that outputs "blank" JSON output so that the user can output that to a file, edit it to fill in appropriate values, and then input it to another option that accepts a JSON-formatted file as input.
) -> Result<String> { | ||
let output = self.cli(spec, crate_name)?; | ||
|
||
let content = rustfmt_wrapper::rustfmt_config( |
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.
according to #362 , wouldnt rustfmt
not be used in the -impl ?
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.
Good point; we'll work this out.
This is a prototype feature, not ready to be released, but I'd rather have it in the repo than maintaining it in a branch. It shouldn't impact consumers that don't explicitly use it.
Closes oxidecomputer/oxide.rs#46
cc: @david-crespo, @zephraph, @karencfv