OpenAPITools / OpenAPITools/openapi-generator
[BUG][csharp-nancyfx] An invalid c# Modules file is created under certain conditions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Description
Sometimes (I'm not sure what's the trigger), the c# nancyfx code generator emits an empty (and invalid) "using ;") line in a Modules file.
openapi-generator version
master
OpenAPI declaration file content or url
swagger: "2.0"
info:
version: "0.0.1"
title: "bug"
host: "localhost:8080"
basePath: "/v1alpha1"
schemes:
- "http"
paths:
/test:
post:
parameters:
- in: "body"
name: "body"
schema:
type: "object"
properties:
name:
type: "string"
responses:
"204":
description: "successful operation"
Generation Details
standard csharp-nancyfx generation.
Steps to reproduce
generate the above spec file and look in the file: src/Org.OpenAPITools/Modules/DefaultModule.cs
Related issues/PRs
Suggest a fix
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Generate the provided Swagger 2.0 specification with the csharp-nancyfx generator, then inspect src/Org.OpenAPITools/Modules/DefaultModule.cs. Trace the template or generator path responsible for the Modules file and identify why an empty using directive is emitted. Done means the generated file contains no invalid "using ;" line for this reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100