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

[Bug]: OpenAPI Conversion With Missing OperationIds Error Message #6085

Open
4 tasks done
adstep opened this issue Feb 20, 2025 · 0 comments
Open
4 tasks done

[Bug]: OpenAPI Conversion With Missing OperationIds Error Message #6085

adstep opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working needs-area

Comments

@adstep
Copy link

adstep commented Feb 20, 2025

Describe the bug

I was trying to generate a csharp client library for Partner Center OpenApi v3 using typespec for the first time. I hit an error trying to translate the OpenApi spec to typespec.

Seems like it might be related to the fact that the OpenApi spec doesn't define operationIds. Took me a while to figure this out as the error isn't very clear what's going on. If it is the case, might want to add some better error handling to call out that as a requirement.

Reproduction

tsp-openapi3 .\swagger.json --output-dir ./tsp-output
TypeError: Cannot read properties of undefined (reading 'split')
at getScopeAndName (file:///C:/Users/adstep/AppData/Roaming/npm/node_modules/@typespec/openapi3/dist/src/cli/actions/convert/utils/get-scope-and-name.js:3:31)
at transformPaths (file:///C:/Users/adstep/AppData/Roaming/npm/node_modules/@typespec/openapi3/dist/src/cli/actions/convert/transforms/transform-paths.js:32:20)
at transform (file:///C:/Users/adstep/AppData/Roaming/npm/node_modules/@typespec/openapi3/dist/src/cli/actions/convert/transforms/transforms.js:9:24)
at convertAction (file:///C:/Users/adstep/AppData/Roaming/npm/node_modules/@typespec/openapi3/dist/src/cli/actions/convert/convert-file.js:13:21)

Checklist

@adstep adstep added the bug Something isn't working label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

1 participant