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

[FEATURE] Golang generator should include comments from parameter descriptions #2116

Open
2 tasks done
TertiumOrganum1 opened this issue Oct 29, 2024 · 8 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@TertiumOrganum1
Copy link

Why do we need this improvement?

Golang generator should include comments from parameter descriptions

How will this change help?

Golang generator should include comments from parameter descriptions

Screenshots

No response

How could it be implemented/designed?

Golang generator should include comments from parameter descriptions

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

None

@TertiumOrganum1 TertiumOrganum1 added the enhancement New feature or request label Oct 29, 2024
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@jonaslagoni
Copy link
Member

Makes sense, happy to accept PRs 🙏

@toffee-k21
Copy link

Hey @jonaslagoni, I think this change should apply to all the languages we support, not just Golang

@jonaslagoni
Copy link
Member

Feel free to create an issue per language where this is missing (some already have it), or jump straight into a PR @toffee-k21 ✌️

@TertiumOrganum1
Copy link
Author

Feel free to create an issue per language where this is missing (some already have it), or jump straight into a PR @toffee-k21 ✌️

What do you mean - per language? I've specified Golang in the title. I can't fix it myself in your code, but it should be very quick for those how know modelina codebase

@jonaslagoni
Copy link
Member

jonaslagoni commented Oct 30, 2024

We got multiple languages that dont have a preset that include descriptions.

I can't fix it myself in your code, but it should be very quick for those how know modelina codebase

This is the basic recipe:

  1. Copy https://github.com/asyncapi/modelina/blob/master/src/generators/typescript/presets/DescriptionPreset.ts to start off with for Go https://github.com/asyncapi/modelina/tree/master/src/generators/go
  2. Adapt the preset
  3. Add a test
  4. Create a PR

@TertiumOrganum1
Copy link
Author

We got multiple languages that dont have a preset that include descriptions.

I can't fix it myself in your code, but it should be very quick for those how know modelina codebase

This is the basic recipe:

  1. Copy https://github.com/asyncapi/modelina/blob/master/src/generators/typescript/presets/DescriptionPreset.ts to start off with for Go https://github.com/asyncapi/modelina/tree/master/src/generators/go
  2. Adapt the preset
  3. Add a test
  4. Create a PR

sorry this code doesn't make sense to me at all, I'm from c++/go

@TertiumOrganum1
Copy link
Author

TertiumOrganum1 commented Nov 3, 2024

We got multiple languages that dont have a preset that include descriptions.

I can't fix it myself in your code, but it should be very quick for those how know modelina codebase

This is the basic recipe:

  1. Copy https://github.com/asyncapi/modelina/blob/master/src/generators/typescript/presets/DescriptionPreset.ts to start off with for Go https://github.com/asyncapi/modelina/tree/master/src/generators/go
  2. Adapt the preset
  3. Add a test
  4. Create a PR

DescriptionPreset.ts.txt

Ok, I've copied and adopted DescriptionPreset.ts from typescript to go, added it to go/presets/index.ts, but it never called and no comments in my generated sources. What should I do to make it work?

nothing new in comments, annoying "ResponsePayload represents a ResponsePayload model" still exists, so I assume that my preset even doesn't called. Maybe it is not plugged in inside modelina for golang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants