Skip to content

Conversation

@aditya4044656
Copy link

Description

This pull request improves the AsyncAPI test specification by adding explicit
operation tags and improving repository hygiene. The goal is to make the
specification easier to understand, better organized, and aligned with
AsyncAPI best practices.

Changes

  • Added measurement operation tag to publish and subscribe operations in
    test/asyncapi.yaml
  • Added a global measurement tag definition with a clear description
  • Updated .gitignore to exclude the generated/ directory to prevent
    accidental commits of auto-generated files

Motivation

Operation tags help categorize and group AsyncAPI operations, making the
documentation easier to navigate and improving clarity for contributors and
tooling. Excluding generated files ensures a cleaner repository and avoids
unintentional changes to generated output.

Type of Change

  • Documentation improvement
  • Non-breaking change
  • Repository hygiene improvement

Additional Notes

  • No functional code changes were made
  • All changes are backward compatible
  • Local build and checks pass successfully

Thank you for reviewing this contribution. Feedback and suggestions are very
welcome.

Added tags to publish and subscribe operations in test/asyncapi.yaml to improve API documentation and organization. Also added generated/ to .gitignore to prevent committing generated code.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide 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.

@aditya4044656
Copy link
Author

Hello @smoya@anandsunderraman👋

I’ve opened this pull request to improve the AsyncAPI test specification by
adding operation tags and a small .gitignore update for generated files.

Could someone please review this when you have time?
Happy to make any changes or improvements

- Add v3 compatibility layer in components/common.js
  - getAsyncAPIVersion() to detect spec version
  - hasPublishCompat() and hasSubscribeCompat() for v2/v3 operations
  - getPublishOperationCompat() and getSubscribeOperationCompat() helpers

- Update all handler functions to accept asyncapi parameter
  - SubscriptionHandlers, PublishHandlers, Imports, Handlers
  - publishConfigsFrom now uses compatibility functions

- Update template files to pass asyncapi parameter
  - template/asyncapi/handlers.js
  - template/index.js

- Update package.json generator version to support v3 (>=1.3.0 <3.0.0)

- Add v3 test specifications
  - test/files/docWithAMQPublisherV3.yml (receive operations)
  - test/files/docWithAMQPSubscriberV3.yml (send operations)

- Add v3 test cases (commented out - require parser v3 upgrade)
  - Tests will be enabled when @asyncapi/parser is upgraded to v3.x

- Fix GetProtocolFlags() to handle channels with bindings but no operations

- Add .golangci.yml to exclude vendor directories from linting

BREAKING CHANGE: None - Full backward compatibility with v2 maintained

Closes #954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant