-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Support customizing filename in M.E.ApiDescription.Server tool #56974
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 customizing filename in M.E.ApiDescription.Server tool #56974
Conversation
@dotnet-policy-service agree |
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommandWorker.cs
Outdated
Show resolved
Hide resolved
4342d4c
to
d85cbc0
Compare
d85cbc0
to
5970e87
Compare
…ds in it with help command
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommand.cs
Outdated
Show resolved
Hide resolved
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommandContext.cs
Outdated
Show resolved
Hide resolved
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommandWorker.cs
Outdated
Show resolved
Hide resolved
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommandWorker.cs
Outdated
Show resolved
Hide resolved
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.
Left another round of comments to hopefully get this to the finish line.
Mostly around renaming the argument so it's a little bit clearer that it is modifying the filename (which happens to default to the project name).
Also, can you add some tests in this file so we have coverage for this? The other tests should be a good example of what to do.
I've renamed the command like you recommend, add a verification on the value to use only "valid" characters and tests :) Hope this will be good this time :) |
I've seen that the Helix test failed but by looking the log output I can't find whats wrong :/ Can you tell me ? |
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.
A few final comments then we should be good to go.
I've seen that the Helix test failed but by looking the log output I can't find whats wrong :/ Can you tell me ?
This test failure is unrelated to your PR. We have some flakey tests in the repo that can cause these failures. Usually, we're able to quarantine or re-run the build and have things resolved.
src/Tools/GetDocumentInsider/src/Commands/GetDocumentCommand.cs
Outdated
Show resolved
Hide resolved
@@ -27,6 +27,12 @@ public void Configure(CommandLineApplication command) | |||
Platform = command.Option("--platform <Target>", Resources.PlatformDescription); | |||
ProjectName = command.Option("--project <Name>", Resources.ProjectDescription); | |||
RuntimeFrameworkVersion = command.Option("--runtime <RUNTIME_IDENTIFIER>", Resources.RuntimeDescription); | |||
command.Option("--prefix-output", Resources.PrefixDescription); |
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.
Why do we need this changes? I believe the options in GetDocumentCommand
is sufficient for this case.
Hi, I'm waiting your reply to commit or not. Can you tell me if it's good for you to let this options available to have them in the -help ? |
Hmmm....can you clarify what you mean? Are you talking about my feedback here about removing the extraneous options? If so, I'd prefer to be conservative about the change we're making here and limit it to just the filename option, especially as we approach RC1. |
Yes it's that. I'll remove the extra options and commit as soon as possible. |
… command of dotnet-document
🎉🎉🎉 |
No problem! Thanks for taking the time to submit a PR! |
Add option to specify custom OpenAPI output file name like Swashbuckle.AspNetCore.Cli
Description
Added new CLI parameter to specifiy a output file name when generating OpenAPI JSON
Fixes #56973 (in this specific format)