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

Add deprecated fields support #89

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Conversation

josephsumabat
Copy link
Contributor

Adds support for the concept of "deprecated fields" - fields which are still required by older clients but we no longer want to generate on newer ones.

These fields will be:

  • Required in the Haskell type
  • Commented out on generated code

@@ -418,6 +419,13 @@ data Options = Options
--
-- This can be used with @omitFields = const Discard@ to ensure fields are
-- retained for client compatibility.
, deprecatedFields :: [(String, Maybe String)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe not necessary to have the comment as part of this since we could comment on the type directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EDIT: @tadfisher noted commenting on the type makes it show up as a doc comment which we dont want since the field is commented out

@josephsumabat josephsumabat force-pushed the joseph/add-deprecated-fields branch 3 times, most recently from a65b78a to e935786 Compare October 10, 2024 17:46
@josephsumabat josephsumabat force-pushed the joseph/add-deprecated-fields branch from e935786 to f5abee8 Compare October 10, 2024 18:03
@josephsumabat josephsumabat merged commit 10c8238 into master Oct 11, 2024
21 checks passed
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.

2 participants