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!: update to parser API v3 #459

Merged
merged 8 commits into from
Nov 29, 2023

Conversation

jonaslagoni
Copy link
Member

@jonaslagoni jonaslagoni commented Nov 15, 2023

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

@jonaslagoni jonaslagoni changed the title feat: bump dependency versions fix: drift of parser versions Nov 16, 2023
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.")
Copy link
Member Author

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
Copy link
Member Author

@jonaslagoni jonaslagoni Nov 16, 2023

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.

Copy link
Member Author

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

helpers/all.js Outdated Show resolved Hide resolved
derberg
derberg previously approved these changes Nov 21, 2023
Copy link
Member

@derberg derberg left a 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

fmvilas
fmvilas previously approved these changes Nov 21, 2023
@jonaslagoni
Copy link
Member Author

@derberg @fmvilas so the test actually blocks the release right now.

Do you want to make the CI check optional for a bit or?

@jonaslagoni jonaslagoni dismissed stale reviews from fmvilas and derberg via 381796e November 29, 2023 20:36
@jonaslagoni jonaslagoni changed the title fix: drift of parser versions feat!: update to parser API v3 Nov 29, 2023
Copy link

sonarcloud bot commented Nov 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jonaslagoni
Copy link
Member Author

Ready to be reviewed for a final time @fmvilas @derberg

@jonaslagoni
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 542f8db into asyncapi:master Nov 29, 2023
11 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonaslagoni jonaslagoni deleted the bump_versions branch November 29, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants