Skip to content

fix: resolving wrong reference#180

Merged
VisualBean merged 1 commit intomainfrom
alex/fixnullreference
Jun 14, 2024
Merged

fix: resolving wrong reference#180
VisualBean merged 1 commit intomainfrom
alex/fixnullreference

Conversation

@VisualBean
Copy link
Contributor

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
@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