-
Notifications
You must be signed in to change notification settings - Fork 201
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
Invalid console view when reusing handlers in API #7203
Labels
🐛 bug
Something isn't working
Comments
How does this behave at runtime? Is this just a console issue? |
The test pass, so it is just a console issue |
eladb
changed the title
can't reuse handler
Invalid console view when reusing handlers in API
Oct 30, 2024
@skyrpex can you take a quick look? |
I think it's on the previous parts of the toolchain. I modified the example a bit:
and then run {
"version": "tree-0.1",
"tree": {
"id": "root",
"path": "root",
"children": {
"Default": {
"id": "Default",
"path": "root/Default",
"children": {
"Api": {
"id": "Api",
"path": "root/Default/Api",
"children": {
"Endpoint": {
"id": "Endpoint",
"path": "root/Default/Api/Endpoint",
"constructInfo": {
"fqn": "@winglang/sdk.cloud.Endpoint",
"version": "0.0.0"
},
"display": {
"title": "Endpoint",
"description": "Api root/Default/Api",
"hidden": true
}
},
"Policy": {
"id": "Policy",
"path": "root/Default/Api/Policy",
"constructInfo": {
"fqn": "@winglang/sdk.sim.Policy",
"version": "0.0.0"
},
"display": {
"title": "Policy",
"description": "A simulated resource policy",
"hidden": true
}
},
"OnRequestHandler0": {
"id": "OnRequestHandler0",
"path": "root/Default/Api/OnRequestHandler0",
"constructInfo": {
"fqn": "@winglang/sdk.cloud.Function",
"version": "0.0.0"
},
"display": {
"title": "GET /my-shared-handler1",
"description": "A cloud function (FaaS)",
"sourceModule": "@winglang/sdk"
}
},
"ApiEventMapping0": {
"id": "ApiEventMapping0",
"path": "root/Default/Api/ApiEventMapping0",
"constructInfo": {
"fqn": "@winglang/sdk.std.Resource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
},
"OnRequestHandler1": {
"id": "OnRequestHandler1",
"path": "root/Default/Api/OnRequestHandler1",
"constructInfo": {
"fqn": "@winglang/sdk.cloud.Function",
"version": "0.0.0"
},
"display": {
"title": "GET /my-private-handler3",
"description": "A cloud function (FaaS)",
"sourceModule": "@winglang/sdk"
}
},
"ApiEventMapping1": {
"id": "ApiEventMapping1",
"path": "root/Default/Api/ApiEventMapping1",
"constructInfo": {
"fqn": "@winglang/sdk.std.Resource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
},
"OnRequestHandler2": {
"id": "OnRequestHandler2",
"path": "root/Default/Api/OnRequestHandler2",
"constructInfo": {
"fqn": "@winglang/sdk.cloud.Function",
"version": "0.0.0"
},
"display": {
"title": "POST /my-private-handler4",
"description": "A cloud function (FaaS)",
"sourceModule": "@winglang/sdk"
}
},
"ApiEventMapping2": {
"id": "ApiEventMapping2",
"path": "root/Default/Api/ApiEventMapping2",
"constructInfo": {
"fqn": "@winglang/sdk.std.Resource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
}
},
"constructInfo": {
"fqn": "@winglang/sdk.cloud.Api",
"version": "0.0.0"
},
"display": {
"title": "Api",
"description": "A REST API endpoint"
}
},
"$Closure1_0": {
"id": "$Closure1_0",
"path": "root/Default/$Closure1_0",
"constructInfo": {
"fqn": "@winglang/sdk.std.AutoIdResource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
},
"$Closure2_0": {
"id": "$Closure2_0",
"path": "root/Default/$Closure2_0",
"constructInfo": {
"fqn": "@winglang/sdk.std.AutoIdResource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
},
"$Closure3_0": {
"id": "$Closure3_0",
"path": "root/Default/$Closure3_0",
"constructInfo": {
"fqn": "@winglang/sdk.std.AutoIdResource",
"version": "0.0.0"
},
"display": {
"hidden": true
}
}
},
"constructInfo": {
"fqn": "@winglang/sdk.std.Resource",
"version": "0.0.0"
},
"display": {}
},
"ParameterRegistrar": {
"id": "ParameterRegistrar",
"path": "root/ParameterRegistrar",
"constructInfo": {
"fqn": "@winglang/sdk.platform.ParameterRegistrar",
"version": "0.0.0"
},
"display": {
"hidden": true
}
}
},
"constructInfo": {
"fqn": "@winglang/sdk.core.App",
"version": "0.0.0"
},
"display": {}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this:
This happened:
notice missing POST on shared-handler
I expected this:
Is there a workaround?
No response
Anything else?
No response
Wing Version
0.85.22
Node.js Version
No response
Platform(s)
No response
Community Notes
The text was updated successfully, but these errors were encountered: