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

Generate SDK with non-optional output members when the @required trait is applied #1559

Open
2 tasks
jbelkins opened this issue Jun 10, 2024 · 0 comments
Open
2 tasks
Labels
feature-request A feature should be added or improved. indiv-svc-client

Comments

@jbelkins
Copy link
Contributor

Describe the feature

Output models should be generated with non-optional Swift properties for members having the @required trait.

  • Models should continue to be optional under the hood / in private Swift properties. Presence of required members should be checked during deserialization, and then force-unwrapped by a public accessor when the customer accesses the member.
  • There should be a mechanism for Trebuchet to identify a breaking API change related to the required trait, and the SDK will major version that service as needed.
  • Models that are used as both input and output may have non-optional getters; this is okay since customers should not use getters when preparing a request for input.

Use Case

To make best use of Swift language features by exposing required members as non-optional.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@jbelkins jbelkins added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 10, 2024
@jbelkins jbelkins added indiv-svc-client and removed needs-triage This issue or PR still needs to be triaged. labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. indiv-svc-client
Projects
None yet
Development

No branches or pull requests

1 participant