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

[BUG] dropping valid schema fields on bundle #185

Closed
2 tasks done
rlsf opened this issue Aug 11, 2024 · 6 comments
Closed
2 tasks done

[BUG] dropping valid schema fields on bundle #185

rlsf opened this issue Aug 11, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@rlsf
Copy link

rlsf commented Aug 11, 2024

Describe the bug.

in version 2.3.2 there is a regression in the bundle command output.
we use the bundle command to create a single spec file. our spec file adheres to asyncapi spec 2.0.0. and declares it using

asyncapi: 2.0.0

as the first line in the doc.
we use tags and custom attributes in our document e.g:

asyncapi: 2.0.0
x-company-attr-1: attr-value-1
x-company-attr-2: attr-value-2
info:
  title: Service Name
  version: 1.0.0
  description: Description
  x-company-version: 1.2.3
tags:
  - name: my-tag
    description: tag description

executing the bundler results in the custom attributes and the tags being removed. making the doc invalid:

asyncapi: 2.0.0
info:
  title: Service Name
  version: 1.0.0
  description: Description
  x-company-version: 1.2.3

up until version 2.3.0 it worked as expected

Expected behavior

preserve custom properties and tags in bundled output.

Screenshots

see above

How to Reproduce

use the above snippets and execute bundle command.

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

@rlsf rlsf added the bug Something isn't working label Aug 11, 2024
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@rlsf rlsf changed the title [BUG] dropping valid schema fields on bunder [BUG] dropping valid schema fields on bundle Aug 11, 2024
@Souvikns
Copy link
Member

Moving this issue to bundler as this error is originating from bundler library.

@Souvikns Souvikns transferred this issue from asyncapi/cli Aug 17, 2024
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@Souvikns
Copy link
Member

The error is coming from this

bundledDocument = orderPropsAccToAsyncAPISpec(bundledDocument);

@aeworxet
Copy link
Collaborator

@rlsf
This bug was addressed in Bundler v0.6.2 that is now included in CLI v2.3.2 as a patch version of @asyncapi/bundler: https://github.com/asyncapi/cli/blob/master/package.json#L12

Please do

rm -rf node_modules
npm install

check, and close the issue if the bug is fixed.

@rlsf
Copy link
Author

rlsf commented Aug 18, 2024

verified, works, thanks.

@rlsf rlsf closed this as completed Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants