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

Customize body parameter #2231

Open
pshao25 opened this issue Feb 19, 2025 · 4 comments
Open

Customize body parameter #2231

pshao25 opened this issue Feb 19, 2025 · 4 comments
Assignees

Comments

@pshao25
Copy link
Member

pshao25 commented Feb 19, 2025

We have some existing services whose put operations have different body from its corresponding resource model. For example, this operation is operating on resource StorageAccount, however, its body is StorageAccountCreateParameters. This is another example from KeyVault. How should we customize the body?

@markcowl
Copy link
Member

markcowl commented Feb 20, 2025

@markcowl markcowl assigned pshao25 and unassigned markcowl Feb 20, 2025
@pshao25
Copy link
Member Author

pshao25 commented Feb 20, 2025

I don't think ArmCreateOperation will record this operation as resource operation, does it?

@markcowl
Copy link
Member

No, you're correct, you would need to add the @armResourceCreateOrUpdate(Resource) decoration, along with @autoRoute

@welovej
Copy link
Member

welovej commented Feb 27, 2025

It works. Thanks @markcowl

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

No branches or pull requests

3 participants