Closed gregwinterstein closed 5 months ago
Rebased to resolve conflicts in GenerateCommand.cs
@gregwinterstein Kindly look into review comments by @gathogojr
@gregwinterstein Kindly look into review comments by @gathogojr
Hello @KenitoInc , I wlll respond as soon as I can. You all have caught me at an extremely busy time
@gregwinterstein Kindly look into review comments by @gathogojr
Hello @KentoInc & @gathogojr, I have reviewed your comments and updated the pull request as requested.
Hi! What is the situation of this PR? I'd really like to get the ConnectedService.json
file support for CLI.
Could we add some tests to this Pr ?
@wachugamaina
Could we add some tests to this Pr ?
This pull request adds a command-line option for reading generation configuration from ConnectedService.json file
Command-line option: --config-file
The overwhelming majority of the changes are in src/Microsoft.OData.Cli/GenerateCommand.cs, inside private methods.
What would you like to see tested in this pull request? How would you propose to test the changes in this pull request?
We do need to improve the test setup for the CLI, not just this PR (cc @ElizabethOkerio). See: https://github.com/OData/ODataConnectedService/issues/254
What would be a good starting point in testing the CLI is that the CLI options are correctly transformed into the expected ServiceConfig
. And for the purpose of this PR, we would test whether the config in the JSON config files are correctly applied to the ServiceConfig
. That would require some refactoring and setting a test project. The next step would be to consider some E2E tests, running the CLI and checking the results. Maybe that's beyond the scope of this PR? If it is, then something we should prioritize with a sense of urgency.
We do need to improve the test setup for the CLI, not just this PR (cc @ElizabethOkerio). See: #254
What would be a good starting point in testing the CLI is that the CLI options are correctly transformed into the expected
ServiceConfig
. And for the purpose of this PR, we would test whether the config in the JSON config files are correctly applied to theServiceConfig
. That would require some refactoring and setting a test project. The next step would be to consider some E2E tests, running the CLI and checking the results. Maybe that's beyond the scope of this PR? If it is, then something we should prioritize with a sense of urgency.
@habbes I think that given that most of the CLI options are not currently tested, this should be out of scope for this pull request. At this point, I do not have the time to implement tests for the CLI options.
@gregwinterstein Please take note of the following two review comments. Not sure you saw them since they were collapsed:
@gregwinterstein Please take note of the following two review comments. Not sure you saw them since they were collapsed:
* [Add command-line option for ConnectedService.json file #363 (comment)](https://github.com/OData/ODataConnectedService/pull/363#discussion_r1537580774) * [Add command-line option for ConnectedService.json file #363 (comment)](https://github.com/OData/ODataConnectedService/pull/363#discussion_r1537610589)
@gathogojr Thank you for the reminder. I have replied to both of the comments you mentioned above. Please review.
Add command-line option for reading generation configuration from ConnectedService.json file Command-line option: --connected-service-file or -c
Fixes #338 Fixes #327