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: allow non backward compatible required member #566

Conversation

eduardomourar
Copy link
Contributor

@eduardomourar eduardomourar commented Jun 28, 2022

Issue #, if available: #503

Description of changes:

A continuation of PR #537, but we will allow to remove | undefined by setting an input configuration called requiredMemberMode with the following possible values:

  • nullable: this is the current behavior and it will be the default. When set, it allows a member that has the @required trait applied to be undefined. By doing so it can still be considered a backwards compatible change for Smithy services even when the required constraint is dropped from a member .
  • strict: this will remove | undefined from the generated code.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eduardomourar eduardomourar marked this pull request as ready for review July 18, 2022 18:11
@eduardomourar eduardomourar requested a review from a team as a code owner July 18, 2022 18:11
@eduardomourar eduardomourar force-pushed the feat/non-backward-compatible-required-member branch from d456dae to f3bb827 Compare October 5, 2022 13:05
@cmoher cmoher requested a review from srchase December 14, 2022 15:01
@eduardomourar eduardomourar requested a review from a team as a code owner January 24, 2023 02:12
@srchase
Copy link
Contributor

srchase commented Jan 25, 2023

Issue #, if available: #503

Description of changes:

A continuation of PR #537, but we will allow to remove | undefined by setting an input configuration called backwardCompatibleRequiredMember to false.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Can the overall PR description get updated with the enums and what impact each has on the generated code?

srchase
srchase previously approved these changes Jan 31, 2023
@srchase srchase self-requested a review January 31, 2023 20:28
@syall syall dismissed srchase’s stale review January 31, 2023 20:42

Decided to look into an alternative option.

eduardomourar and others added 3 commits February 3, 2023 21:48
…/typescript/codegen/TypeScriptSettings.java

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
…/typescript/codegen/TypeScriptSettings.java

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
…/typescript/codegen/TypeScriptSettings.java

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
eduardomourar and others added 2 commits February 3, 2023 21:48
…/typescript/codegen/TypeScriptSettings.java

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
…/typescript/codegen/StructureGenerator.java

Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
@srchase srchase merged commit 1b7ccc0 into smithy-lang:main Feb 6, 2023
@eduardomourar eduardomourar deleted the feat/non-backward-compatible-required-member branch March 15, 2023 20:50
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
* feat: allow non backward-compatible required member
---------

Co-authored-by: Eduardo Rodrigues <eduardomourar@users.noreply.github.com>
Co-authored-by: Jaykumar Gosar <5666661+gosar@users.noreply.github.com>
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.

3 participants