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

feat: initial version #1

Merged
merged 111 commits into from
Dec 10, 2020

Conversation

jonaslagoni
Copy link
Sponsor Member

@jonaslagoni jonaslagoni commented Mar 28, 2020

Description

Here are some of the features I include in the template:

  • The ability to change the payload right before sending it and after receiving it through hooks
  • The template will generate an Object oriented structure, meaning all the messages, channels and schemas will be generated separately using quicktype.
  • The ability to promisify reply callbacks.
  • The ability to generate a test client based on the mirrored version of the provided AsyncAPI file.

TODO

  • Create initial client
  • Create initial test client
  • Add event emitter to client
  • Add generate test client argument for optional test client
  • Create hooks for managing data processing i.e. encryption etc
  • Test BeforeSendingData and RecievedData hooks for changing the message
  • Finish promisify parameter for reply callbacks
  • Ensure all related security schemas are supported and how to integrate into the template
    The security schemas have in this version no influence on what is generated. I don't have an actual use-case where this is necessary so this will not be prioritized.
  • Add template readme file for usage
  • Cleanup code for review

TODO (maybe)

Waiting for asyncapi/generator#216 to decide whether to continue include the following:

  • Decide if allOf, anyOf and oneOf should be included in generating messages and schemas. If not, remove existing code
    Changed to let quicktype generate the schemas. allOf messages are not supported.
  • Add enum schema generation
    Letting quicktype handle this.

Issues it fixes

@fmvilas
Copy link
Member

fmvilas commented Mar 31, 2020

Hey mate! Just a quick reminder that we're migrating the template structure. You should move everything that should or might be copied to the output folder to its own folder called "template". Also, .filters, .hooks, and .partials are now called filters, hooks, and partials respectively. And they should be placed outside the "template" folder, i.e. in the root folder of this repo, along with the package.json file, etc.

See this PR as an example: asyncapi/nodejs-template#5

… the generated code.

fix: Ensured the right client is used for the right channels.
fix: The channelname is not realized based on paramters and converted to NATS channel.
@jonaslagoni
Copy link
Sponsor Member Author

I have added some integration tests which the template generates in order to test that both the test client and and client can talk to each other and gets the correct data.

That finishes the initial version IMO, so this should be the last review unless other changes are requested.

@derberg
Copy link
Member

derberg commented Dec 1, 2020

@jonaslagoni I think we can merge it as then improve afterwords. Just solve conflict and remove .github/workflows/automerge-release-pr-bump.yml as it is there in the master already.

Remeber that feat! means 1.0.0. but we release 0.1.0

@jonaslagoni jonaslagoni changed the title feat!: Initial version feat: Initial version Dec 4, 2020
@jonaslagoni
Copy link
Sponsor Member Author

@derberg good call, all done 👍

@derberg
Copy link
Member

derberg commented Dec 7, 2020

@jonaslagoni you did not remove .github/workflows/automerge-release-pr-bump.yml, its latest version is in master already https://github.com/asyncapi/ts-nats-template/blob/master/.github/workflows/automerge.yml

@jonaslagoni
Copy link
Sponsor Member Author

@jonaslagoni you did not remove .github/workflows/automerge-release-pr-bump.yml, its latest version is in master already https://github.com/asyncapi/ts-nats-template/blob/master/.github/workflows/automerge.yml

Yea merged master into my PR. But I have removed them now.

@derberg derberg changed the title feat: Initial version feat: initial version Dec 7, 2020
@derberg
Copy link
Member

derberg commented Dec 7, 2020

@fmvilas as per my comment

@jonaslagoni I think we can merge it as then improve afterwords

can you approve PR too?

@jonaslagoni jonaslagoni merged commit 8af4617 into asyncapi:master Dec 10, 2020
@jonaslagoni jonaslagoni deleted the feature/initial_version branch December 10, 2020 09:02
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonaslagoni
Copy link
Sponsor Member Author

@all-contributors please add @ColinSullivan1 review

@allcontributors
Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @ColinSullivan1! 🎉

@jonaslagoni
Copy link
Sponsor Member Author

@all-contributors please add @aricart review

@allcontributors
Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @aricart! 🎉

@jonaslagoni
Copy link
Sponsor Member Author

@all-contributors please add @aricart review

@allcontributors
Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @aricart! 🎉

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

Successfully merging this pull request may close these issues.

None yet

6 participants