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

Show how to generate Go data models #387

Closed
8 tasks
jonaslagoni opened this issue Sep 22, 2021 · 4 comments · Fixed by #568
Closed
8 tasks

Show how to generate Go data models #387

jonaslagoni opened this issue Sep 22, 2021 · 4 comments · Fixed by #568
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest Label issues as available for participants of https://hacktoberfest.digitalocean.com released on @next released

Comments

@jonaslagoni
Copy link
Member

jonaslagoni commented Sep 22, 2021

We have recently changed the documentation approach for this library to be user-centric. Meaning we explain use-cases and ways to use this library, rather than just give you a list of possible configurations. In that effort, we need your help to provide the very best developer experience!

What to solve

We want to show how people can generate Go structs using the GoGenerator.

Duplicate the folder https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE and rename it to generate-go-models. And instead of using the TypeScriptGenerator, you have to use the GoGenerator. Update any relevant documentation.

Some folks want more specific tasks to complete, or use this if you get stuck - CLICK ME

This issue is specially designed for first-time contributors, that want to contribute their very first code. If you are accustomed to how to solve issues in AsyncAPI, you can skip some of the steps.

What to know before getting started

Before actually getting started with solving the issue, there are a few things that need to be set up:

Feel free to reach out either here in the issue, or on slack under #tooling if you have any questions or are stuck, we will gladly help.

Getting started

This is a task list, that you copy into your PR description to ensure everything is included, this list walks you through each step as to how to solve this issue. It assumes that you have already set up your fork and branch and are ready to commit code.

  • Duplicate the folder https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE and rename it to generate-go-models. This will give you a good base to start out with.
  • Adapt the documentation about the feature and ensure the example are linked correctly.
    • The docs that need to change are the following: docs/usage.md#generate-go-models
    • The documentation must reference an actual example that is tested and contain no code itself. It is because the docs will inevitably become desynchronized and display incorrect code.
  • Adapt the examples overview to include your new example.
  • Now it is time to adapt the test code (in examples/generate-go-models/index.spec.ts) and the implementation (in examples/generate-go-models/index.ts). See the implementation details below for more details on how to achieve it.
  • Make sure that the test succeeds, by standing in the new example folder and execute npm run test.
  • Make sure that there are no linting errors, by standing in the root folder and execute npm run lint.
  • Create your PR, by selecting your branch that should be merged with the master branch - https://github.com/asyncapi/modelina/compare
  • It is good practice to double-check your PR before requesting a review from someone else, the same way you read an assignment before handing it in.

Do you have any examples I can check for reference?

We have currently 4 example documentations that you can look for guidance on how to achieve the desired output:

@jonaslagoni jonaslagoni added enhancement New feature or request documentation good first issue Good for newcomers Hacktoberfest Label issues as available for participants of https://hacktoberfest.digitalocean.com labels Sep 22, 2021
@quetzalliwrites
Copy link
Member

Happy Hacktoberfest, everyone! ✨✨ Feel free to reach out to me for any questions you may have about adding documentation on these open issues. 🙂

Tag me in your AsyncAPI Doc PRs 📄, my GitHub handle is /alequetzalli 🐙.

@joseluiszuflores
Copy link

I would like work in this issue

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.42.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0-next.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest Label issues as available for participants of https://hacktoberfest.digitalocean.com released on @next released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants