Skip to content

[BUG][csharp-nancyfx] An invalid c# Modules file is created under certain conditions #7756

Open
@tzickel

Description

@tzickel

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions