Azure / Azure/Connectors-NET-SDK

Add Swagger 2.0 multipart/form-data operation support

Open
#212 0 comments 0 reactions 0 assignees View on GitHub
.NET enhancement generator
Dominant language
C#
Stars
3
Forks
5
Avg merge
1d 15h
Merged PRs (30d)
7

Description

## Problem

The generated Connector SDK currently excludes Swagger 2.0 operations that require `formData` or are multipart-only because `ConnectorClientBase` has no multipart request transport and the generators cannot model form fields. PR #210 makes that exclusion deterministic; current examples include Cloudmersive Convert, Docuware file operations, and Zoho Sign `CreateDocumentAsync`.

Generating these methods as JSON or raw binary would produce invalid wire requests.

## Scope

- Model Swagger 2.0 `formData` parameters, including `file`, scalar text fields, arrays/repeated parts, requiredness, and operation-level `consumes` overrides.
- Generate ergonomic .NET method signatures for file bytes/streams, filenames, media types, and ordinary form fields.
- Add a multipart request path in `ConnectorClientBase` that emits boundaries, `Content-Disposition`, filenames, per-part `Content-Type`, and cancellation correctly.
- Decide ownership/disposal semantics for streams and multipart content.
- Add generator regressions for multipart-only, mixed JSON/multipart, multiple files, optional fields, arrays, and whitespace/media-type parameters.
- Add on-wire SDK tests that inspect raw multipart bytes and headers.
- Define TypeScript and Python parity or track explicit follow-ups before enabling the same operations there.
- Regenerate affected clients and document restored operations and any signature choices.

## Acceptance criteria

- Supported multipart/form-data operations are generated and send connector-compatible wire requests.
- Unsupported multipart shapes remain explicitly excluded with actionable diagnostics.
- Existing JSON and raw `application/octet-stream` request paths are unchanged.
- Cloudmersive Convert, Docuware, and Zoho Sign representative operations have generator and transport coverage.

## Estimate

Medium to large. This crosses generator schema modeling, public API design, shared HTTP transport, generated output, and tests. It should be implemented in a dedicated PR rather than expanding #210.

Contributor guide

Open the contributing guide

Research direction

Start with ConnectorClientBase and the deterministic exclusion from PR #210, then trace how generators model Swagger 2.0 parameters and consumes overrides. Compare the representative Cloudmersive Convert, Docuware, and Zoho Sign operations, and review the requested generator regressions and raw multipart tests. Done means supported operations generate valid multipart requests while unsupported shapes remain explicitly diagnosed and existing request paths are unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend-api-design, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.