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

OperationId is being incorrectly resolved #74

Open
qiaozha opened this issue Jan 14, 2025 · 3 comments
Open

OperationId is being incorrectly resolved #74

qiaozha opened this issue Jan 14, 2025 · 3 comments

Comments

@qiaozha
Copy link
Contributor

qiaozha commented Jan 14, 2025

See https://github.com/allenjzhang/typespec-e2e-demo/blob/main/todoApp/openapi3/openapi.yaml#L33
The operationId is TodoItems_createJson_TodoItems_createForm which should be incorrect.

@chrisradek
Copy link
Collaborator

What do you expect the operationId to be in this case? I believe it has this form because it is concatenating the results of all the operations in the shared route.

There happens to be a bug filed in the past few days to change the operationId for this exact scenario:
microsoft/typespec#5513

@qiaozha
Copy link
Contributor Author

qiaozha commented Jan 17, 2025

actually I feel like in this case we should duplicate the operations, because merging the sharedRoute requests and response would lost their original 1 request and 1 response mapping information. but I do know we are using http verb as the operation key, so I was unsure. Maybe other experts from typespec team could have some ideas?

@wanlwanl
Copy link

@qiaozha could you share more about why we need 1 request and 1 response mapping information?
Looks like we can get the mapping by media type.

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

No branches or pull requests

3 participants