Skip to content

[BUG][csharp-netcore] Compilation-Error if you have a property named Validate in your schema ("already contains a definition for 'Validate'") #14462

@Cyber1000

Description

@Cyber1000
Description
  • If you have a property named Validate in your schema you end up with two validates (one property "validate" and a method named "Validate" from your side.

image

- Property Validate also generated:

image

openapi-generator version

6.2.1

OpenAPI declaration file content or url

openproject-api (so I can't change it on my own): https://community.openproject.org/api/v3/spec.yml

Generation Details

openapi-generator-cli generate -i https://community.openproject.org/api/v3/spec.yml -g csharp-netcore -o api --additional-properties=sourceFolder=src,optionalProjectFile=false,excludeTests=true

Suggest a fix
  • Maybe rename your Method to Validate1 (or better), if you find a property Validate in a single class
    • no idea how complicated this would be, think you're using a template

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