-
Notifications
You must be signed in to change notification settings - Fork 166
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
[Epic] Design for PATCH operation models from TypeSpec #3648
Comments
duplicate with #2492 |
Original designA model only in patch requestAccording to api guidelines,
All the properties in the PATCH request of generated SDK should be optional. Case 1: The properties in spec are all optional
Option 1 (Don't change name): It follows the api guidance so just go with the design in Azure/azure-sdk-for-net#37341 Case 2: Still have required properties in spec because response could have the required properties
This means input is Option 1: We may need a linter in emitter to block required properties in spec. And let users to choose one of:
Option2: We think it is valid spec by implicitly creating a new model e.g. A model in both patch request and other operations
Option 1: block this by linter "same model cannot be both in the patch request and other operations". Again, let users to choose one of:
Option 2: generate normal Service driven storyCase 1: first has a PATCH and then has a PUT/GET
Case 2: first has a PUT/GET and then has a PATCH
Considering both of these two scenarios, it might be necessary to have a new model e.g. |
Tasks
Related tasks
The text was updated successfully, but these errors were encountered: