Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: the C# client library generator does not use the 'sourceFolder' option when generate the test project code.

オープン
#12,751 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
csharp
領域
tooling

調査の方向性

まず test.yaml と ConfigCodeGen.json を使ってコマンドを再現し、次に C# ジェネレーターがテストプロジェクトのコードと IO プロジェクトで出力パスをどのように選択しているかを調べます。設定された sourceFolder によってテストプロジェクトのソースの場所が制御され、常に src の下に配置される状態でなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Bug

Description

The C# client library generator does not use the 'sourceFolder' option when generate the test project code.

Swagger Codegen Version

3.0.81

Language / Generator

csharp

OpenAPI/Swagger Spec

Content of the test.yaml file.

openapi: 3.0.0
info:
  version: "1.0.0"
  title: "Test"
paths:
  /status:
    get:
      operationId: getAssetStatus
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetStatus'
components:
  schemas:
    AssetStatus:
      type: object
      properties:
        live:
          type: boolean
      required:
        - live

Configuration file used

Content of the ConfigCodeGen.json file.

{
  "sourceFolder": "."
}

Command Line Used

java -jar swagger-codegen-cli.jar generate -l csharp -o code -c ConfigCodeGen.json -i test.yaml

Steps to Reproduce

  1. Run the generator using the command line specified and the indicated input files.

Expected Behavior

The generator should place the code of the test project in the folder specified through the configuration file as per the IO project.

Actual Behavior

The source code of the test project is place inside the 'src' folder regardless of the configuration.

Environment

  • OS: Windows 11;
  • Java Version: OpenJDK 26.0.1;
  • Build Tool: not builded by myself, I'm using the pre-build version;
  • Swagger Codegen CLI version: 3.0.81.

Checklist

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have included a minimal and reproducible spec example.
  • I have explained how to reproduce the issue.
  • I have specified which generator/language is affected.
主要言語
Mustache
スター
17.8k
フォーク
6k
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

swagger-api/swagger-codegen のほかの issue

swagger-api/swagger-codegen の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。