Skip to content

Add Swagger 2.0 multipart/form-data operation support #212

Description

@daviburg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or requestgeneratorCodefulSdkGenerator issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions