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(rulesets): validate unresolved AsyncAPI document #2262

Conversation

magicmatatjahu
Copy link
Contributor

@magicmatatjahu magicmatatjahu commented Aug 29, 2022

Fixes #2261.

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

Screenshots

The following AsyncAPI document is invalid and Spectral should throw errors due to invalid defined references (in impossible places):

asyncapi: '2.0.0'
channels: 
  someChannel:
    publish:
      $ref: '#/components/x-operations/someOperation'
components:
  'x-operations':
    someOperation: ...

and Spectral will return errors:

[
  {
    message: 'Referencing here is not allowed',
    path: ['channels', 'someChannel', 'publish', '$ref'],
    severity: DiagnosticSeverity.Error,
  }
]

@magicmatatjahu magicmatatjahu added the enhancement New feature or request label Aug 29, 2022
@jonaslagoni
Copy link
Collaborator

@magicmatatjahu is this ready to be reviewed or do you still need to do some work regarding #2262 (comment)?

@magicmatatjahu
Copy link
Contributor Author

@jonaslagoni Yeah, when I will find time, I will create PR with uniqueId for schema function.

@jonaslagoni
Copy link
Collaborator

Any update on this one @magicmatatjahu? Or do you want to close it?

@P0lip P0lip force-pushed the develop branch 4 times, most recently from 4b6a9e1 to 33deb2b Compare May 23, 2023 20:53
@P0lip P0lip force-pushed the develop branch 3 times, most recently from dc9d7f4 to 44c40e2 Compare May 23, 2023 22:56
@P0lip P0lip force-pushed the develop branch 4 times, most recently from 02ec0d4 to 84faec8 Compare June 9, 2023 19:43
@P0lip P0lip force-pushed the develop branch 3 times, most recently from 9e92f34 to 6d09915 Compare September 20, 2023 18:42
@P0lip P0lip force-pushed the develop branch 3 times, most recently from dc90b7a to c22f408 Compare April 4, 2024 13:29
@mnaumanali94
Copy link
Contributor

Closing as stale. Feel free to open if needed. @jonaslagoni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsyncAPI Issues related to the AsyncAPI ruleset enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a rule to validate unresolved AsyncAPI document
4 participants