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: resolving wrong reference #180

Merged
merged 1 commit into from
Jun 14, 2024
Merged

fix: resolving wrong reference #180

merged 1 commit into from
Jun 14, 2024

Conversation

VisualBean
Copy link
Collaborator

About the PR

When a reference is resolved, that doesnt map to the correct type, for instance;

asyncapi: 2.3.0
info:
  title: test
  version: 1.0.0
channels:
  workspace:
    publish:
      message:
        $ref: '#/components/securitySchemes/saslScram'
components:
  securitySchemes:
    saslScram:
      type: scramSha256
      description: Provide your username and password for SASL/SCRAM authentication

mapping a message to a securityScheme. No error will be present in the diagnostics object.
The message will simply be null.

This PR adds a quick and dirty exception to reference resolution when casting to T ends with being null.

@VisualBean VisualBean merged commit 47685cd into main Jun 14, 2024
6 checks passed
@VisualBean VisualBean deleted the alex/fixnullreference branch June 14, 2024 10:35
VisualBean added a commit that referenced this pull request Jun 14, 2024
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.

1 participant