Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#12,751 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp
Ambito
tooling

Direzione di ricerca

Inizia riproducendo il comando con test.yaml e ConfigCodeGen.json, quindi esamina come il generatore C# sceglie il percorso di output per il codice del progetto di test rispetto al progetto IO. Il lavoro è completato quando il sourceFolder configurato controlla la posizione del codice sorgente del progetto di test, invece di inserirlo sempre sotto src.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Mustache
Stelle
17.8k
Fork
6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di swagger-api/swagger-codegen

Tutte le issue di swagger-api/swagger-codegen

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.