Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [CSharp] Api methods generates without variable name #19502

Open
5 of 6 tasks
filipe-silva opened this issue Sep 1, 2024 · 5 comments
Open
5 of 6 tasks

[BUG] [CSharp] Api methods generates without variable name #19502

filipe-silva opened this issue Sep 1, 2024 · 5 comments

Comments

@filipe-silva
Copy link
Contributor

filipe-silva commented Sep 1, 2024

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?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Hello, so I've updated from 7.0.1 to 7.8.0 and weirdly the constructor variables are without name...
I was expecting it not to change anything aside from the methods I joined in a previous PR.
I've tested the versions and with started happening from 7.5.0 upwards.

imagem

openapi-generator version

7.8.0

OpenAPI declaration file content or url

Here the Yaml I'm using.
https://gist.github.com/filipe-silva/bfe824f2a6b2ea170cd29ea4c326ab4d

Generation Details
Steps to reproduce

Simply generate the code using the terminal:
npx @openapitools/openapi-generator-cli generate -c openapi-dotnet.yaml

openapi-dotnet.yaml content:

{
  "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "7.8.0"
  }
}
Suggest a fix

Couldn't figure out what was the breaking change, if someone can point me in the right direction I'll fix it.

@devhl-labs
Copy link
Contributor

Using the latest master I am not able to duplicate this problem. Where do you specify what generator to use?

@filipe-silva
Copy link
Contributor Author

Using the latest master I am not able to duplicate this problem. Where do you specify what generator to use?

My mistake, this is the real openapi-dotnet.yaml content:

# To generate the client:
# npx @openapitools/openapi-generator-cli generate -c openapi-dotnet.yaml

inputSpec: api-yaml/firefly-iii-2.0.2.yaml
generatorName: csharp
outputDir: generated/
packageName: FireflyIIINet
packageVersion: 2.0.2.1
targetFramework: net6.0
templateDir: out

What I wrote on the first message was the openapitools.json content.

@devhl-labs
Copy link
Contributor

Still can't duplicate this problem with the latest master.

@filipe-silva
Copy link
Contributor Author

Still can't duplicate this problem with the latest master.

Can you tell me how you do it?
I have the repository and VSCode, but I can't figure out how to use the lastest code...

@devhl-labs
Copy link
Contributor

devhl-labs commented Sep 2, 2024

You can use intellij to run whatever is in your repo. You can probably do the same in VS Code using launch.json, but I don't do it that way.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants