-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fix issue in populate rest operation arguments. #52663
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import "@typespec/rest"; | ||
| import "@typespec/openapi"; | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
|
|
||
| namespace MgmtTypeSpec; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Http; | ||
| using TypeSpec.OpenAPI; | ||
|
|
||
|
|
||
| model JobResource | ||
| is Azure.ResourceManager.TrackedResource<JobProperties, false> { | ||
| ...ResourceNameParameter< | ||
| Resource = JobResource, | ||
| KeyName = "jobName", | ||
| SegmentName = "jobs", | ||
| NamePattern = "^[-\\w\\.]+$" | ||
| >; | ||
| } | ||
|
|
||
| model JobProperties { | ||
| jobName: string; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface JobResources { | ||
| /** | ||
| * Gets information about the specified job. | ||
| */ | ||
| get is ArmResourceRead< | ||
| JobResource, | ||
| Parameters = { | ||
| /** | ||
| * $expand is supported on details parameter for job, which provides details on the job stages. | ||
| */ | ||
| @query("$expand") | ||
| $expand?: string; | ||
| }, | ||
| >; | ||
|
|
||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @patch(#{ implicitOptionality: false }) | ||
| update is ArmCustomPatchAsync< | ||
| JobResource, | ||
| PatchModel = JobResourceUpdateParameter, | ||
| >; | ||
| } | ||
|
|
||
| model JobResourceUpdateParameter { | ||
| properties?: JobProperties; | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| tags?: Record<string>; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.