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

fix: update @asyncapi/bundler to 0.5.0 version #1415

Merged
merged 5 commits into from
May 9, 2024

Conversation

aeworxet
Copy link
Contributor

@aeworxet aeworxet commented May 8, 2024

This PR:

  • Updates package @asyncapi/bundler to 0.5.0 version
  • Makes the behavior of the CLI's asyncapi bundle command consistent with the standalone Bundler application and its README.md
  • Updates tests and test YAMLs

> writes to the resulting YAML the full contents of stdout, which now contains more than just the pure contents of the output YAML, thereby polluting the specified YAML. Therefore > is no longer listed as an additional output option in the help.

@aeworxet
Copy link
Contributor Author

aeworxet commented May 8, 2024

Pinging @Amzani for #1200 / #1228 and @francocm for #1389 so they are aware of this mandatory PR.

Should fix #1323 by @mfroberg

CLI's bundle command with Bundler of version 0.5.0:

asyncapi bundle main.yaml -o asyncapi.yaml

asyncapi: 3.0.0
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  userSignedUp:
    address: user/signedup
    messages:
      UserSignedUp:
        payload:
          type: object
          properties:
            displayName:
              type: string
              description: Name of the user
            email:
              type: string
              format: email
              description: Email of the user
operations:
  onUserSignUp:
    action: receive
    channel:
      $ref: '#/channels/userSignedUp'
    messages:
      - $ref: '#/channels/userSignedUp/messages/UserSignedUp'
components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          displayName:
            type: string
            description: Name of the user
          email:
            type: string
            format: email
            description: Email of the user

Standalone Optimizer of version 1.0.2:

const optimizedDocument = optimizer.getOptimizedDocument({
  output: 'YAML',
  rules: {
    reuseComponents: true,
    removeComponents: true,
    moveAllToComponents: true,
    moveDuplicatesToComponents: false,
  },
  disableOptimizationFor: {
    schema: true,
  },
})

asyncapi: 3.0.0
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  userSignedUp:
    address: user/signedup
    messages:
      UserSignedUp:
        $ref: '#/components/messages/UserSignedUp'
operations:
  onUserSignUp:
    action: receive
    channel:
      $ref: '#/channels/userSignedUp'
    messages:
      - $ref: '#/channels/userSignedUp/messages/UserSignedUp'
components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          displayName:
            type: string
            description: Name of the user
          email:
            type: string
            format: email
            description: Email of the user

Copy link

sonarcloud bot commented May 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Shurtu-gal Shurtu-gal left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

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

LGTM

@aeworxet
Copy link
Contributor Author

aeworxet commented May 9, 2024

/rtm

@asyncapi-bot asyncapi-bot merged commit e4815e0 into asyncapi:master May 9, 2024
11 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.12.2 🎉

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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants