-
Notifications
You must be signed in to change notification settings - Fork 200
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]: Crash when using void or null as body type. #3073
Labels
Comments
LadyCailin
changed the title
[Bug]: Crash when using void as body type.
[Bug]: Crash when using void or null as body type.
Mar 28, 2024
thanks for the nice repro, it he case of what you were trying to do either you want the response to be exactly void or you should add the crash nevertheless shouldn’t be happening and we should give you a better error |
timotheeguerin
added a commit
that referenced
this issue
Mar 28, 2024
fix #3073 This still doesn't provide an optimal experience as the error shows up on the void type instead of where it is referenced but solving that is that long standing issue about tracing back where an error should be
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Error: Unknown intrinsic type void
at OpenAPI3SchemaEmitter.intrinsic (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/openapi3/dist/src/schema-emitter.js:319:15)
at file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:377:55
at withTypeContext (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:520:9)
at invokeTypeEmitter (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:367:9)
at Object.emitType (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:268:28)
at file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:160:37
at withPatchedReferenceContext (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:535:28)
at Object.emitTypeReference (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:142:20)
at OpenAPI3SchemaEmitter.modelPropertyLiteral (file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/openapi3/dist/src/schema-emitter.js:177:40)
at file:///C:/Users/Cailin/OneDrive/Code/CommandHelper/src/main/resources/apps.methodscript.com/node_modules/@typespec/compiler/dist/src/emitter-framework/asset-emitter.js:377:55
Library Version 0.54.0
TypeSpec Compiler Version 0.54.0
Reproduction
https://typespec.io/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7DQp1c2luZyBUeXBlU3BlYy5IdHRwOw0KDQppbnRlcmZhY2UgZm9vIHsNCiAgQGdldCBiYXIoKTrGESAgYm9keTogdm9pZMQQfQ0KfQ%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%7D
Checklist
The text was updated successfully, but these errors were encountered: