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: fetching asyncapi file from server in cli and library #346

Merged
merged 3 commits into from
May 21, 2020
Merged

feat: fetching asyncapi file from server in cli and library #346

merged 3 commits into from
May 21, 2020

Conversation

derberg
Copy link
Member

@derberg derberg commented May 15, 2020

Description

  • new function exposed -> generateFromURL
  • support in CLI so we can do ag https://raw.githubusercontent.com/asyncapi/asyncapi/master/examples/2.0.0/streetlights.yml @asyncapi/html-template

validation if path is filesystem path or url is very basic here, not based on any sophisticated regex but just using url.parse. Let me know if you think it is bad approach. I don't see a use case that someone uses this feature as a library and on a server passes relative path to fetch the file from the same server where the generator is running, I think it is always about fetching from different server (hostname)

Related issue(s)
Resolves #266

@derberg derberg changed the title feat: cli support fetching asyncapi file from server and new generate… feat: fetching asyncapi file from server in cli and library May 15, 2020
@derberg derberg requested a review from fmvilas May 15, 2020 14:00
cli.js Outdated Show resolved Hide resolved
cli.js Show resolved Hide resolved
Co-authored-by: Fran Méndez <[email protected]>
fmvilas
fmvilas previously approved these changes May 21, 2020
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments but they're not blockers for this PR. Great stuff man 👏

README.md Outdated Show resolved Hide resolved
cli.js Show resolved Hide resolved
Co-authored-by: Fran Méndez <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@derberg derberg merged commit 7408c69 into asyncapi:master May 21, 2020
@derberg derberg deleted the remote-spec branch May 21, 2020 09:11
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.49.0 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support remote AsyncAPI files
3 participants