OpenAPITools / OpenAPITools/openapi-generator

[CSHARP] Is dotnetstandard 1.3 really supported ?

Open
#17,374 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hello,

I want to generate a client targeting dotnetstandard 1.3, using the targetFramework property of the CSharp generator. Maybe I'm missing something but the following code template is not compatible with the dotnetstandard 1.x specification. The GetMethod property is only available for netstandard version > 2.0

https://github.com/OpenAPITools/openapi-generator/blob/809b3331a95b3c3b7bcf025d16ae09dc0682cd69/modules/openapi-generator/src/main/resources/csharp/modelOneOf.mustache#L262

We could potentially use conditionnal #if directives to support the 1.x specification.

Am I missing something ?

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 modules/openapi-generator/src/main/resources/csharp/modelOneOf.mustache around line 262 and review how the CSharp generator handles the targetFramework property. Generate a client targeting dotnetstandard 1.3 and compare the generated code with the dotnetstandard 1.x API specification. Done means the generated client is compatible with that target, or the issue is confirmed as unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.