Problem
The generated trigger operation constants distinguish between binary-content triggers (e.g., OnNewFileV2) and metadata triggers (e.g., OnNewFilesV2) only through XML doc comments. Binary triggers lack a Payload type annotation while metadata triggers have one:
- OnNewFileV2: no payload type, sends base64-encoded file bytes in a JSON envelope
- OnNewFilesV2: annotated with OnedriveforbusinessOnNewFilesTriggerPayload, sends structured metadata
This is insufficient for tooling. The LSP cannot programmatically determine which triggers return binary content vs typed metadata, preventing it from generating the correct deserialization code.
Proposed Solution
- Add a TriggerPayloadKind enum: Metadata, BinaryContent
- Annotate each trigger constant with an attribute or convention that indicates the payload kind
- For binary triggers, the Triggers.Operations dictionary should map to a sentinel type or null (currently binary triggers are excluded from the dictionary entirely, which is an implicit but undocumented convention)
- Update the CodefulSdkGenerator to emit these annotations from the swagger trigger definitions
Impact
- SDK consumers trying to handle binary triggers must manually discover the base64 JSON envelope pattern
- The LSP cannot auto-generate the JsonDocument inspection code needed for binary payloads
- The Samples project had to discover this pattern through live E2E testing (Connectors-NET-Samples#15)
Problem
The generated trigger operation constants distinguish between binary-content triggers (e.g., OnNewFileV2) and metadata triggers (e.g., OnNewFilesV2) only through XML doc comments. Binary triggers lack a Payload type annotation while metadata triggers have one:
This is insufficient for tooling. The LSP cannot programmatically determine which triggers return binary content vs typed metadata, preventing it from generating the correct deserialization code.
Proposed Solution
Impact