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

Introduce remote-templates support #235

Closed
derberg opened this issue Mar 4, 2020 · 7 comments
Closed

Introduce remote-templates support #235

derberg opened this issue Mar 4, 2020 · 7 comments
Labels
enhancement New feature or request Epic

Comments

@derberg
Copy link
Member

derberg commented Mar 4, 2020

Reason:

To simplify development of the templates, and also usage of templates we want to make it possible to publish templates separately and then have an option to use them in a generator from a remote location.

Description:

  • we should not only support calling a template from a local directory, but also from remote location. NPM? Git? URL? check out how similar tools like yeoman are doing it
  • have some kind of autodiscovery/registry mechanism so user can easily list available templates. With NPM it could be solved with the support of tags in package.json and NPM API
  • it should be clear which templates are officially supported by asyncapi maintainers and which ones are not
  • update docs!
@j-d-carmichael
Copy link

Is anyone already working on this?

@fmvilas
Copy link
Member

fmvilas commented Mar 15, 2020

Not yet but it's top priority right now so we should start working on it probably next week.

@j-d-carmichael
Copy link

j-d-carmichael commented Mar 15, 2020

How will you solve the core and template dependency alignment issue?

We initially just pulled the tpls in via git but then when the core brought in new features or a new format the older tpls started to break so we went with a quick and dirty solution of tagging the tpl git branches then comparing again the core npm version: https://github.com/acrontum/openapi-nodegen/blob/master/src/lib/template/TemplateFetch.ts#L183

We were just speaking the other day internally about changing this as confused a few of our team mates and to instead use the built in versioning system from NPM opposed to git tagging. It is a tricky one to solve and be clear to the end user.

Scenario being:
async-generator v1.5.0 would today work with template repo XYZ.
tomorrow ag v2.0.0 is released which breaks the rpl repo XYZ

@fmvilas
Copy link
Member

fmvilas commented Mar 15, 2020

I'm happy that you ask. This was partially solved already: #219.

There's also this issue: #237.

Everything related to making the Generator stable (i.e., v1.0.0) is our top priority so all these features/fixes should be implemented soon.

@j-d-carmichael
Copy link

Nice! Looking forward to it 👍

@fmvilas fmvilas added the Epic label Mar 16, 2020
@jonaslagoni
Copy link
Sponsor Member

Implemented in #261

@fmvilas
Copy link
Member

fmvilas commented Apr 5, 2020

Thanks, man! 👍

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

No branches or pull requests

4 participants