-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
Reason/Context
Currently, we inline the references inside the AsyncAPI document. However, I think the references should be kept, and relocate it inside components instead, or provide an option to do so, although I dont know why both would be needed. This also fixes a problem with circular references.
For example:
# asyncapi.yaml
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user/signup:
subscribe:
message:
$ref: './messages.yaml#/messages/UserSignedUp'
#messages.yaml
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the userShould resolve to:
# After combining
asyncapi: 2.2.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user/signedup:
subscribe:
message:
$ref: '#/components/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