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: vnext schema refs #185

Open
wants to merge 4 commits into
base: vnext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion test/LEGO.AsyncAPI.Tests/Models/AsyncApiReference_Should.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@ public void AsyncApiReference_WithExternalResourcesInterface_DeserializesCorrect
var message = doc.Channels["workspace"].Publish.Message.First();
message.Name.Should().Be("Test");
var payload = message.Payload.As<AsyncApiJsonSchemaPayload>();
payload.Properties.Count.Should().Be(3);
payload.Properties.Count.Should().Be(4);
payload.Properties["orderHistory"].Properties.Count.Should().Be(2);
payload.Properties["orderHistory"].Properties["historyStorageRecord"].Properties.First().Key.Should()
.Be("historyLog");
}

[Test]
Expand Down Expand Up @@ -426,6 +429,8 @@ public string Load(string reference)
userName:
description: User name.
type: string
orderHistory:
$ref: '#/components/schemas/OrderHistory'
required:
- orderId
example:
Expand All @@ -434,6 +439,24 @@ public string Load(string reference)
orderDetails:
userId: Admin
userName: Admin
components:
schemas:
OrderHistory:
type: object
properties:
historyId:
description: ID for order history storage
type: string
format: uuid
historyStorageRecord:
$ref: '#/components/schemas/HistoryStorageRecord'
HistoryStorageRecord:
type: object
properties:
historyLog:
type: array
items:
type: string
""";
}
}
Expand Down
Loading