Skip to content

[csharp] Optional enum parameters in method declarations should not be = null #4446

Description

@gdurand
Description

In a Model class constructor, if a parameter of type enum is optional, it is defaulted to null, which is illegal for enums.

Swagger-codegen version

master

Suggest a Fix

Perhaps default it to 0, but it is a valid enum value so it's no better, unless enums are generated starting with value 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions