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: show warning for wrong spelled params #350

Merged
merged 3 commits into from
May 21, 2020

Conversation

Tenischev
Copy link
Member

Description

  • show warning for wrong spelled params

Example:

ag asyncapi.yaml @asyncapi/html-template -p baseHef=/doc -o output
Warning: This template doesn't have following params: baseHef.

Related issue(s)
Resolves: #345

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.

Great feature! 👏 I just left a minor comment.

Suggestion: It would be amazing if it could show something like "Did you mean..."
Shouldn't be hard leveraging the Levenshtein algorithm: https://www.npmjs.com/package/levenshtein-edit-distance.

lib/generator.js Outdated 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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Tenischev
Copy link
Member Author

Suggestion: It would be amazing if it could show something like "Did you mean..."
Shouldn't be hard leveraging the Levenshtein algorithm: https://www.npmjs.com/package/levenshtein-edit-distance.

I hope you wouldn't mind if i'll create a separate issue for it?

@Tenischev Tenischev requested a review from fmvilas May 20, 2020 16:25
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.

Absolutely. No need to do it now :)

@Tenischev
Copy link
Member Author

Created #351

@derberg derberg merged commit 2bdd7c3 into asyncapi:master May 21, 2020
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.48.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.

Add a hint about wrong parameter name
4 participants