Auto-generate binary trigger payload handling from SDK annotations
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by locating where the LSP processes ConnectorTriggerMetadata and where CodeAction or CodeLens features are registered; no files or tests are named in the issue. Check prerequisite SDK issue #51 first, then define completion as handling binary and metadata payloads and warning about typed deserialization on binary triggers.
Written by the indexing model from the issue text.
Description
Problem
When a developer writes a trigger callback function for a binary-content trigger (e.g., OneDrive OnNewFileV2), they must manually write JsonDocument inspection code to detect the body field type and decode base64 content. This boilerplate is error-prone and non-obvious.
The AI Gateway sends binary triggers as JSON with a base64 string body:
- Binary: {"body":""}
- Metadata: {"body":{"value":[{...typed items...}]}}
Both arrive with Content-Type: application/json, so content-type sniffing does not work.
Proposed Solution
When the LSP detects a [ConnectorTriggerMetadata] attribute referencing a binary-content trigger operation, it should:
- Offer a CodeAction/CodeLens to generate the binary payload handling boilerplate
- Generate the JsonDocument body-type inspection pattern
- Generate the base64 decode + byte array extraction
- Warn if the developer uses a typed TriggerCallbackPayload deserializer on a binary trigger
Prerequisites
This depends on Azure/Connectors-NET-SDK#51 - the SDK needs to annotate trigger operations as binary vs metadata before the LSP can act on them.
- Dominant language
- C#
- Stars
- 0
- Forks
- 4
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/Connectors-NET-LSP
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Azure/Connectors-NET-LSP#35 ·
All issues in Azure/Connectors-NET-LSP
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·