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

Limitation for tsp to handle operation id from swagger #55

Closed
Tracked by #72
tadelesh opened this issue Dec 25, 2023 · 2 comments
Closed
Tracked by #72

Limitation for tsp to handle operation id from swagger #55

tadelesh opened this issue Dec 25, 2023 · 2 comments
Labels
external:mgmt external:swagger-converter Issues related to the swagger-converter tool needs-area

Comments

@tadelesh
Copy link
Member

For tsp, interface name could not be same with the model name, meanwhile, interface name will be recognized as operation id for SDK and generated swagger. However, for some RP, model name is same with the operation id, see example.

Two possible solutions:

  1. use @projectedName to rename interface, but current typespec-autorest does not honor @projectedName.
  2. introduce another new decorator in typespec-azure-resource-manager to identify operation id for each operation.

I prefer 2.

@tadelesh tadelesh added the ARM label Dec 25, 2023
@ArthurMa1978 ArthurMa1978 changed the title Limitation for tsp to handle operation id from swagger [P0] Limitation for tsp to handle operation id from swagger Jan 3, 2024
@ArthurMa1978 ArthurMa1978 added the external:swagger-converter Issues related to the swagger-converter tool label Jan 3, 2024
@ArthurMa1978 ArthurMa1978 changed the title [P0] Limitation for tsp to handle operation id from swagger Limitation for tsp to handle operation id from swagger Jan 3, 2024
@markcowl
Copy link
Member

markcowl commented Jan 5, 2024

@tadelesh The correct thing to do here is to use the client name projection to set the operationId

Here is a sample showing the OperationId changing when the client projected name of the interface is changed

@markcowl markcowl closed this as completed Jan 5, 2024
@tadelesh
Copy link
Member Author

tadelesh commented Jan 8, 2024

Thanks @markcowl . Implemented in converter: Azure/autorest@054fdf8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external:mgmt external:swagger-converter Issues related to the swagger-converter tool needs-area
Projects
None yet
Development

No branches or pull requests

3 participants