swagger-api / swagger-api/swagger-codegen

Customize C# code generation on File parameter

Open
#8,902 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

The C# code generator automatically converting a parameter of type "File" to "System.IO.Stream" even when I have defined custom schema definition for the "File" type. How can I override this default behavior and have the APIs return the custom object instead of Stream?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the C# code generator's handling of the custom schema definition for the "File" type, then trace where File parameters become System.IO.Stream. Confirm whether an override is supported; done means documenting the supported customization or identifying the generator change needed for APIs to return the custom object.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.