Skip to content

Use input file OpenApi format / version as the default output format / version in Hidi #658

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

Conversation

danielmbaluka
Copy link
Contributor

@danielmbaluka danielmbaluka commented Dec 6, 2021

Issue: #651

The current transform command in Hidi defaults to JSON as the output format when no explicit format is specified. This is not the intended behaviour in most cases.

This PR improves the transform command by using the default input file format and OpenApi version as the output format and version when no format or version is explicitly specified.

Copy link
Contributor

@MaggieKimani1 MaggieKimani1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do the same for OpenApi version too?

@danielmbaluka
Copy link
Contributor Author

Should we do the same for OpenApi version too?

I think we would want to. cc @darrelmiller

@@ -22,7 +22,7 @@ static class OpenApiService
string input,
FileInfo output,
OpenApiSpecVersion version,
OpenApiFormat format,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to use OpenApiFormat? (nullable OpenApiFormat) so that you can distinguish between being sent a parameter or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darrelmiller that's a good suggestion. I adopted it. Thank you.

@danielmbaluka danielmbaluka force-pushed the feature/dm/use-input-file-format-as-default-ouput-format-in-hidi branch 3 times, most recently from 93a31f7 to 03ab201 Compare January 2, 2022 16:29
@danielmbaluka danielmbaluka changed the title Use input file OpenApi format as the default output format in Hidi Use input file OpenApi format / version as the default output format / version in Hidi Jan 2, 2022
@danielmbaluka danielmbaluka force-pushed the feature/dm/use-input-file-format-as-default-ouput-format-in-hidi branch from 03ab201 to f1c3c31 Compare January 2, 2022 17:12
@danielmbaluka
Copy link
Contributor Author

Should we do the same for OpenApi version too?

@MaggieKimani1 @darrelmiller this has been implemented. Thank you.

@MaggieKimani1 MaggieKimani1 self-requested a review January 10, 2022 09:44
@danielmbaluka danielmbaluka force-pushed the feature/dm/use-input-file-format-as-default-ouput-format-in-hidi branch from f1c3c31 to 4e0639f Compare January 19, 2022 23:32
@danielmbaluka danielmbaluka force-pushed the feature/dm/use-input-file-format-as-default-ouput-format-in-hidi branch from bf00ec7 to a06ab0c Compare January 22, 2022 01:58
@darrelmiller darrelmiller merged commit 177b5ea into vnext Jan 22, 2022
@darrelmiller darrelmiller deleted the feature/dm/use-input-file-format-as-default-ouput-format-in-hidi branch January 22, 2022 18:29
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.

4 participants