Skip to content
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

feat: added option 'useJsonWireFormat' #576

Merged
merged 4 commits into from
Jun 2, 2022

Conversation

oyvindwe
Copy link
Collaborator

Fixes issue #571

@oyvindwe oyvindwe changed the title New option 'useJsonWireFormat' feat: added option 'useJsonWireFormat' May 31, 2022
@oyvindwe
Copy link
Collaborator Author

oyvindwe commented Jun 1, 2022

@stephenh I'm not sure how to fix the build. Looks like an issue with the GitHub secrets?

@stephenh
Copy link
Owner

stephenh commented Jun 1, 2022

@oyvindwe yeah, that's weird, we haven't seen that before...I have a tab open on:

actions/checkout#298

To go through when I have time and see if there's something we can poke. :-)

@oyvindwe
Copy link
Collaborator Author

oyvindwe commented Jun 1, 2022

@stephenh Manually trigger the workflow seems like a possible workaround.

@stephenh
Copy link
Owner

stephenh commented Jun 1, 2022

@oyvindwe hm, manually re-running didn't work, but I merged a potential fix to use GITHUB_TOKEN; can you try pulling that in and see if that works?

I think I'd recently bumped the version of actions/checkout and yours might be the first PR running on the new v3.

@oyvindwe
Copy link
Collaborator Author

oyvindwe commented Jun 2, 2022

@stephenh Merged - ready for workflow approval again.

@@ -27,19 +27,20 @@ export function generateEnum(
}

const delimiter = options.enumsAsLiterals ? ':' : '=';
const stringEnums = options.stringEnums || (options.onlyTypes && options.useJsonWireFormat);
Copy link
Owner

Choose a reason for hiding this comment

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

Minor suggestion: wdyt about pushing this handling into options.ts, i.e. somewhere while initializing options, do an options.stringEnums ??= options.onlyTypes && options.useJsonWireFormat? Just to encapsulate it a little bit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's a good idea. I can fix this in a separate PR. (I just pushed this to this branch, as I didn't notice this PR is already merged.)

@stephenh
Copy link
Owner

stephenh commented Jun 2, 2022

Going to go ahead and merge, thanks @oyvindwe !

@stephenh stephenh merged commit a71b145 into stephenh:main Jun 2, 2022
stephenh pushed a commit that referenced this pull request Jun 2, 2022
# [1.115.0](v1.114.7...v1.115.0) (2022-06-02)

### Features

* added option 'useJsonWireFormat' ([#576](#576)) ([a71b145](a71b145)), closes [#571](#571)
@stephenh
Copy link
Owner

stephenh commented Jun 2, 2022

🎉 This PR is included in version 1.115.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants