-
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
Can't generate contoso project with typespec-csharp #4827
Comments
hello @catalinaperalta The error show that there is a type which is not supported. Would you please provide the spec used for us to investigate? thanks |
The root cause is that the |
The root cause is the @pollingOperation(Widgets.getWidgetOperationStatus)
getWidgetOperationStatus is GetResourceOperationStatus<WidgetSuite>; So, the LroMetadata contains |
@catalinaperalta I created a PR to fix the problematic spec: Azure/azure-rest-api-specs#30012 |
This is found during investigation of Azure/autorest.csharp#4827 Normally an lro delete status operation should not return content at the end, so when defining lro deelte operation, it should use a special status operation.
Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See Azure/autorest.csharp#4827 This commit will create a separate polling operation which fits lro delete. The same definition is already available in https://github.com/Azure/typespec-azure/blob/955fc9534c2f7153d45c9fbe5743baa0c104d803/packages/samples/specs/data-plane/trait-versioning/main.tsp#L72-L77
Hi, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See Azure/autorest.csharp#4827 This commit will create a separate polling operation which fits lro delete. The same definition is already available in https://github.com/Azure/typespec-azure/blob/955fc9534c2f7153d45c9fbe5743baa0c104d803/packages/samples/specs/data-plane/trait-versioning/main.tsp#L72-L77 --------- Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See Azure/autorest.csharp#4827 This commit will create a separate polling operation which fits lro delete. The same definition is already available in https://github.com/Azure/typespec-azure/blob/955fc9534c2f7153d45c9fbe5743baa0c104d803/packages/samples/specs/data-plane/trait-versioning/main.tsp#L72-L77 --------- Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Describe the issue or request
Someone from the API mgmt team tried to run
tsp-client init -c https://github.com/Azure/azure-rest-api-specs/blob/431eb865a581da2cd7b9e953ae52cb146f31c2a6/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml
in the azure-sdk-for-net repo and ran into the following emitter issue:Describe your ideas for solutions
I would expect the contoso project in the azure-rest-api-specs repo to be able to be generated with the csharp emitter.
Add labels
As appropriate, select a label to describe how hard the issue is to work
around or how hard it would be to do without a particular feature that
could help make it easier. These labels start with "workaround".
Also select a label that describes how many instances of the workaround
you would have to do without the bug being fixed or feature implemented.
These labels start with "instances".
These labels will help priority bug fixes and feature requests.
If this bug or feature request is for older versions of autorest, please
remove the v3 label and add the v2 label as appropriate.
The text was updated successfully, but these errors were encountered: