-
-
Notifications
You must be signed in to change notification settings - Fork 59
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!: update to parser API v3 #459
Conversation
helpers/all.js
Outdated
@@ -133,7 +133,9 @@ export function includeFile(pathFile) { | |||
* and annotates that specification is parsed. | |||
*/ | |||
export function stringifySpec(asyncapi) { | |||
return stringify(asyncapi); | |||
const stringifiedDoc = stringify(asyncapi); | |||
if(stringifiedDoc === undefined) throw new Error("Unable to stringify parsed AsyncAPI document given by the generator, this should never happen... Please raise an issue for the html-template.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big cause of problems i.e. #456 (have had it multiple times). So thought it was better to throw an error instead of generating empty HTML pages.
tags: | ||
- name: costing | ||
description: "Costing channels, used by Costing clients." | ||
title: Streetlights API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the test document to the v2 document only converted to v3 to keep it consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test will fail until the following PRs have been merged:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commit directly an update to error message
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/rtm |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR fixes that parser versions started to drift, as of
3.0.0-next-major-spec.9
we start using parser API v3 and no longer v2. This PR updates the template to use the newest parser API v3.Related to #456
Supersedes #461