From c97d2c11514ec375cfaf959555344c0b7cfc41a2 Mon Sep 17 00:00:00 2001 From: Manuel Garcia Date: Tue, 9 Dec 2025 15:52:22 +0100 Subject: [PATCH 1/2] v5.5.3 - Saunter nuget updated to v0.13.0 (Veracode flaw related to Newtonsoft 0.9.*) --- docs/CHANGELOG.md | 4 ++++ src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e3ff40d..abfe085 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 5.5.3 +- Changed + - Saunter nuget updated to v0.13.0 (Veracode flaw related to Newtonsoft 0.9.*) + ## 5.5.2 - fixed - fixed a namespace issue diff --git a/src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj b/src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj index 211752c..6e4798f 100644 --- a/src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj +++ b/src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj @@ -16,7 +16,7 @@ - + From f756e259c31aea63623038a1eed80bfb62156d54 Mon Sep 17 00:00:00 2001 From: Manuel Garcia Date: Tue, 9 Dec 2025 16:20:33 +0100 Subject: [PATCH 2/2] Fix unit tests --- .../DocumentFilterTest.cs | 622 +++++++++++++++++- 1 file changed, 619 insertions(+), 3 deletions(-) diff --git a/tests/Ev.ServiceBus.AsyncApi.UnitTests/DocumentFilterTest.cs b/tests/Ev.ServiceBus.AsyncApi.UnitTests/DocumentFilterTest.cs index 88b5371..d26ee7c 100644 --- a/tests/Ev.ServiceBus.AsyncApi.UnitTests/DocumentFilterTest.cs +++ b/tests/Ev.ServiceBus.AsyncApi.UnitTests/DocumentFilterTest.cs @@ -1,3 +1,4 @@ +using System.Text.Json; using System.Threading.Tasks; using FluentAssertions; using Microsoft.AspNetCore.Http; @@ -15,10 +16,277 @@ public async Task CheckStateOfSenderApp() var response = await client.GetAsync("/asyncapi/asyncapi.json"); response.StatusCode.Should().Be(StatusCodes.Status200OK); - var json = await response.Content.ReadAsStringAsync(); - json.Should().Be("{\"asyncapi\":\"2.1.0\",\"info\":{\"title\":\"Receiver API\",\"version\":\"1.0.0\",\"description\":\"Sample sender project\"},\"servers\":{\"sb://yourconnection.servicebus.windows.net/\":{\"url\":\"sb://yourconnection.servicebus.windows.net/\",\"protocol\":\"amqp\"}},\"defaultContentType\":\"application/json\",\"channels\":{\"myqueue\":{\"publish\":{\"operationId\":\"pub/myqueue\",\"summary\":\"myqueue\",\"description\":\"Dispatch of messages through the myqueue Queue\",\"tags\":[{\"name\":\"Queue\",\"description\":\"The type of client\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}},{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"message\":{\"oneOf\":[{\"$ref\":\"#/components/messages/WeatherForecast[]\"}]}},\"bindings\":{\"amqp\":{\"is\":\"queue\",\"queue\":{\"name\":\"myqueue\",\"durable\":true,\"exclusive\":false,\"autoDelete\":false}}}},\"mytopic\":{\"publish\":{\"operationId\":\"pub/mytopic\",\"summary\":\"mytopic\",\"description\":\"Dispatch of messages through the mytopic Topic\",\"tags\":[{\"name\":\"Topic\",\"description\":\"The type of client\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}},{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"message\":{\"oneOf\":[{\"$ref\":\"#/components/messages/WeatherForecast\"},{\"$ref\":\"#/components/messages/User¤UserCreated\"}]}},\"bindings\":{\"amqp\":{\"is\":\"queue\",\"queue\":{\"name\":\"mytopic\",\"durable\":true,\"exclusive\":false,\"autoDelete\":false}}}}},\"components\":{\"schemas\":{\"weatherForecastof\":{\"id\":\"weatherForecastof\",\"title\":\"WeatherForecast[]\",\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/weatherForecastof/definitions/weatherForecast\"},\"definitions\":{\"weatherForecast\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"date\":{\"type\":\"string\",\"format\":\"date-time\"},\"temperatureC\":{\"type\":\"integer\",\"format\":\"int32\"},\"temperatureF\":{\"type\":\"integer\",\"format\":\"int32\"},\"summary\":{\"type\":[\"null\",\"string\"]}}}}},\"weatherForecast\":{\"id\":\"weatherForecast\",\"title\":\"WeatherForecast\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"date\":{\"type\":\"string\",\"format\":\"date-time\"},\"temperatureC\":{\"type\":\"integer\",\"format\":\"int32\"},\"temperatureF\":{\"type\":\"integer\",\"format\":\"int32\"},\"summary\":{\"type\":[\"null\",\"string\"]}}},\"userCreated\":{\"id\":\"userCreated\",\"title\":\"UserCreated\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"userId\":{\"type\":[\"null\",\"string\"]}}}},\"messages\":{\"WeatherForecast[]\":{\"payload\":{\"$ref\":\"#/components/schemas/weatherForecastof\"},\"contentType\":\"application/json\",\"name\":\"WeatherForecast[]\",\"title\":\"WeatherForecast[]\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"WeatherForecast[]\"}}},\"WeatherForecast\":{\"payload\":{\"$ref\":\"#/components/schemas/weatherForecast\"},\"contentType\":\"application/json\",\"name\":\"WeatherForecast\",\"title\":\"WeatherForecast\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"WeatherForecast\"}}},\"User¤UserCreated\":{\"payload\":{\"$ref\":\"#/components/schemas/userCreated\"},\"contentType\":\"application/json\",\"name\":\"User¤UserCreated\",\"title\":\"User/UserCreated\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"User/UserCreated\"}}}},\"correlationIds\":{\"default\":{\"description\":\"Default Correlation ID\",\"location\":\"$message.header#/correlationId\"}}}}"); + var actualDoc = JsonDocument.Parse(json); + var expectedDoc = JsonDocument.Parse(""" + { + "asyncapi": "2.4.0", + "info": { + "title": "Receiver API", + "version": "1.0.0", + "description": "Sample sender project" + }, + "servers": { + "sb://yourconnection.servicebus.windows.net/": { + "url": "sb://yourconnection.servicebus.windows.net/", + "protocol": "amqp" + } + }, + "defaultContentType": "application/json", + "channels": { + "myqueue": { + "publish": { + "operationId": "pub/myqueue", + "summary": "myqueue", + "description": "Dispatch of messages through the myqueue Queue", + "tags": [ + { + "name": "Queue", + "description": "The type of client", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + }, + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/WeatherForecast[]" + } + ] + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "name": "myqueue", + "durable": true, + "exclusive": false, + "autoDelete": false + } + } + } + }, + "mytopic": { + "publish": { + "operationId": "pub/mytopic", + "summary": "mytopic", + "description": "Dispatch of messages through the mytopic Topic", + "tags": [ + { + "name": "Topic", + "description": "The type of client", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + }, + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/WeatherForecast" + }, + { + "$ref": "#/components/messages/User¤UserCreated" + } + ] + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "name": "mytopic", + "durable": true, + "exclusive": false, + "autoDelete": false + } + } + } + } + }, + "components": { + "schemas": { + "weatherForecastof": { + "id": "weatherForecastof", + "title": "WeatherForecast[]", + "type": "array", + "items": { + "$ref": "#/components/schemas/weatherForecastof/definitions/weatherForecast" + }, + "definitions": { + "weatherForecast": { + "type": "object", + "additionalProperties": false, + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "temperatureF": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": [ + "null", + "string" + ] + } + } + } + } + }, + "weatherForecast": { + "id": "weatherForecast", + "title": "WeatherForecast", + "type": "object", + "additionalProperties": false, + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "temperatureF": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": [ + "null", + "string" + ] + } + } + }, + "userCreated": { + "id": "userCreated", + "title": "UserCreated", + "type": "object", + "additionalProperties": false, + "properties": { + "userId": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "messages": { + "WeatherForecast[]": { + "payload": { + "$ref": "#/components/schemas/weatherForecastof" + }, + "contentType": "application/json", + "name": "WeatherForecast[]", + "title": "WeatherForecast[]", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "WeatherForecast[]" + } + } + }, + "WeatherForecast": { + "payload": { + "$ref": "#/components/schemas/weatherForecast" + }, + "contentType": "application/json", + "name": "WeatherForecast", + "title": "WeatherForecast", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "WeatherForecast" + } + } + }, + "User¤UserCreated": { + "payload": { + "$ref": "#/components/schemas/userCreated" + }, + "contentType": "application/json", + "name": "User¤UserCreated", + "title": "User/UserCreated", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "User/UserCreated" + } + } + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + } + } + } + """); + + actualDoc.RootElement.ToString().Should().Be(expectedDoc.RootElement.ToString()); } [Fact] @@ -30,7 +298,355 @@ public async Task CheckStateOfReceiverApp() response.StatusCode.Should().Be(StatusCodes.Status200OK); var json = await response.Content.ReadAsStringAsync(); + var actualDoc = JsonDocument.Parse(json); + var expectedDoc = JsonDocument.Parse(""" + { + "asyncapi": "2.4.0", + "info": { + "title": "Receiver API", + "version": "1.0.0", + "description": "Sample receiver project" + }, + "servers": { + "sb://yourconnection.servicebus.windows.net/": { + "url": "sb://yourconnection.servicebus.windows.net/", + "protocol": "amqp" + } + }, + "defaultContentType": "application/json", + "channels": { + "myqueue": { + "subscribe": { + "operationId": "sub/myqueue", + "summary": "myqueue", + "description": "Reception of messages through the myqueue Queue", + "tags": [ + { + "name": "Queue", + "description": "The type of client", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + }, + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/WeatherForecast[]" + } + ] + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "name": "myqueue", + "durable": true, + "exclusive": false, + "autoDelete": false + } + } + } + }, + "mytopic/Subscriptions/mysubscription": { + "subscribe": { + "operationId": "sub/mytopic/Subscriptions/mysubscription", + "summary": "mytopic/Subscriptions/mysubscription", + "description": "Reception of messages through the mytopic/Subscriptions/mysubscription Subscription", + "tags": [ + { + "name": "Subscription", + "description": "The type of client", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + }, + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/WeatherForecast" + }, + { + "$ref": "#/components/messages/UserCreated" + }, + { + "$ref": "#/components/messages/UserPreferencesUpdated" + } + ] + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "name": "mytopic/Subscriptions/mysubscription", + "durable": true, + "exclusive": false, + "autoDelete": false + } + } + } + }, + "mytopic/Subscriptions/mysecondsubscription": { + "subscribe": { + "operationId": "sub/mytopic/Subscriptions/mysecondsubscription", + "summary": "mytopic/Subscriptions/mysecondsubscription", + "description": "Reception of messages through the mytopic/Subscriptions/mysecondsubscription Subscription", + "tags": [ + { + "name": "Subscription", + "description": "The type of client", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + }, + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/WeatherForecast" + } + ] + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "name": "mytopic/Subscriptions/mysecondsubscription", + "durable": true, + "exclusive": false, + "autoDelete": false + } + } + } + } + }, + "components": { + "schemas": { + "weatherForecastof": { + "id": "weatherForecastof", + "title": "WeatherForecast[]", + "type": "array", + "items": { + "$ref": "#/components/schemas/weatherForecastof/definitions/weatherForecast" + }, + "definitions": { + "weatherForecast": { + "type": "object", + "additionalProperties": false, + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "temperatureF": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": [ + "null", + "string" + ] + } + } + } + } + }, + "weatherForecast": { + "id": "weatherForecast", + "title": "WeatherForecast", + "type": "object", + "additionalProperties": false, + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "temperatureF": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": [ + "null", + "string" + ] + } + } + }, + "userCreated": { + "id": "userCreated", + "title": "UserCreated", + "type": "object", + "additionalProperties": false, + "properties": { + "userId": { + "type": [ + "null", + "string" + ] + } + } + }, + "userPreferencesUpdated": { + "id": "userPreferencesUpdated", + "title": "UserPreferencesUpdated", + "type": "object", + "additionalProperties": false, + "properties": { + "sendNotifications": { + "type": "boolean" + } + } + } + }, + "messages": { + "WeatherForecast[]": { + "payload": { + "$ref": "#/components/schemas/weatherForecastof" + }, + "contentType": "application/json", + "name": "WeatherForecast[]", + "title": "WeatherForecast[]", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "WeatherForecast[]" + } + } + }, + "WeatherForecast": { + "payload": { + "$ref": "#/components/schemas/weatherForecast" + }, + "contentType": "application/json", + "name": "WeatherForecast", + "title": "WeatherForecast", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "WeatherForecast" + } + } + }, + "UserCreated": { + "payload": { + "$ref": "#/components/schemas/userCreated" + }, + "contentType": "application/json", + "name": "UserCreated", + "title": "UserCreated", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "UserCreated" + } + } + }, + "UserPreferencesUpdated": { + "payload": { + "$ref": "#/components/schemas/userPreferencesUpdated" + }, + "contentType": "application/json", + "name": "UserPreferencesUpdated", + "title": "UserPreferencesUpdated", + "tags": [ + { + "name": "Ev.ServiceBus", + "description": "Generated by Ev.ServiceBus", + "externalDocs": { + "description": "Ev.ServiceBus repository", + "url": "https://github.com/EcovadisCode/Ev.ServiceBus" + } + } + ], + "bindings": { + "amqp": { + "contentEncoding": "UTF-8", + "messageType": "UserPreferencesUpdated" + } + } + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + } + } + } + """); - json.Should().Be("{\"asyncapi\":\"2.1.0\",\"info\":{\"title\":\"Receiver API\",\"version\":\"1.0.0\",\"description\":\"Sample receiver project\"},\"servers\":{\"sb://yourconnection.servicebus.windows.net/\":{\"url\":\"sb://yourconnection.servicebus.windows.net/\",\"protocol\":\"amqp\"}},\"defaultContentType\":\"application/json\",\"channels\":{\"myqueue\":{\"subscribe\":{\"operationId\":\"sub/myqueue\",\"summary\":\"myqueue\",\"description\":\"Reception of messages through the myqueue Queue\",\"tags\":[{\"name\":\"Queue\",\"description\":\"The type of client\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}},{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"message\":{\"oneOf\":[{\"$ref\":\"#/components/messages/WeatherForecast[]\"}]}},\"bindings\":{\"amqp\":{\"is\":\"queue\",\"queue\":{\"name\":\"myqueue\",\"durable\":true,\"exclusive\":false,\"autoDelete\":false}}}},\"mytopic/Subscriptions/mysubscription\":{\"subscribe\":{\"operationId\":\"sub/mytopic/Subscriptions/mysubscription\",\"summary\":\"mytopic/Subscriptions/mysubscription\",\"description\":\"Reception of messages through the mytopic/Subscriptions/mysubscription Subscription\",\"tags\":[{\"name\":\"Subscription\",\"description\":\"The type of client\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}},{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"message\":{\"oneOf\":[{\"$ref\":\"#/components/messages/WeatherForecast\"},{\"$ref\":\"#/components/messages/UserCreated\"},{\"$ref\":\"#/components/messages/UserPreferencesUpdated\"}]}},\"bindings\":{\"amqp\":{\"is\":\"queue\",\"queue\":{\"name\":\"mytopic/Subscriptions/mysubscription\",\"durable\":true,\"exclusive\":false,\"autoDelete\":false}}}},\"mytopic/Subscriptions/mysecondsubscription\":{\"subscribe\":{\"operationId\":\"sub/mytopic/Subscriptions/mysecondsubscription\",\"summary\":\"mytopic/Subscriptions/mysecondsubscription\",\"description\":\"Reception of messages through the mytopic/Subscriptions/mysecondsubscription Subscription\",\"tags\":[{\"name\":\"Subscription\",\"description\":\"The type of client\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}},{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"message\":{\"oneOf\":[{\"$ref\":\"#/components/messages/WeatherForecast\"}]}},\"bindings\":{\"amqp\":{\"is\":\"queue\",\"queue\":{\"name\":\"mytopic/Subscriptions/mysecondsubscription\",\"durable\":true,\"exclusive\":false,\"autoDelete\":false}}}}},\"components\":{\"schemas\":{\"weatherForecastof\":{\"id\":\"weatherForecastof\",\"title\":\"WeatherForecast[]\",\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/weatherForecastof/definitions/weatherForecast\"},\"definitions\":{\"weatherForecast\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"date\":{\"type\":\"string\",\"format\":\"date-time\"},\"temperatureC\":{\"type\":\"integer\",\"format\":\"int32\"},\"temperatureF\":{\"type\":\"integer\",\"format\":\"int32\"},\"summary\":{\"type\":[\"null\",\"string\"]}}}}},\"weatherForecast\":{\"id\":\"weatherForecast\",\"title\":\"WeatherForecast\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"date\":{\"type\":\"string\",\"format\":\"date-time\"},\"temperatureC\":{\"type\":\"integer\",\"format\":\"int32\"},\"temperatureF\":{\"type\":\"integer\",\"format\":\"int32\"},\"summary\":{\"type\":[\"null\",\"string\"]}}},\"userCreated\":{\"id\":\"userCreated\",\"title\":\"UserCreated\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"userId\":{\"type\":[\"null\",\"string\"]}}},\"userPreferencesUpdated\":{\"id\":\"userPreferencesUpdated\",\"title\":\"UserPreferencesUpdated\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"sendNotifications\":{\"type\":\"boolean\"}}}},\"messages\":{\"WeatherForecast[]\":{\"payload\":{\"$ref\":\"#/components/schemas/weatherForecastof\"},\"contentType\":\"application/json\",\"name\":\"WeatherForecast[]\",\"title\":\"WeatherForecast[]\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"WeatherForecast[]\"}}},\"WeatherForecast\":{\"payload\":{\"$ref\":\"#/components/schemas/weatherForecast\"},\"contentType\":\"application/json\",\"name\":\"WeatherForecast\",\"title\":\"WeatherForecast\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"WeatherForecast\"}}},\"UserCreated\":{\"payload\":{\"$ref\":\"#/components/schemas/userCreated\"},\"contentType\":\"application/json\",\"name\":\"UserCreated\",\"title\":\"UserCreated\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"UserCreated\"}}},\"UserPreferencesUpdated\":{\"payload\":{\"$ref\":\"#/components/schemas/userPreferencesUpdated\"},\"contentType\":\"application/json\",\"name\":\"UserPreferencesUpdated\",\"title\":\"UserPreferencesUpdated\",\"tags\":[{\"name\":\"Ev.ServiceBus\",\"description\":\"Generated by Ev.ServiceBus\",\"externalDocs\":{\"description\":\"Ev.ServiceBus repository\",\"url\":\"https://github.com/EcovadisCode/Ev.ServiceBus\"}}],\"bindings\":{\"amqp\":{\"contentEncoding\":\"UTF-8\",\"messageType\":\"UserPreferencesUpdated\"}}}},\"correlationIds\":{\"default\":{\"description\":\"Default Correlation ID\",\"location\":\"$message.header#/correlationId\"}}}}"); + actualDoc.RootElement.ToString().Should().Be(expectedDoc.RootElement.ToString()); } } \ No newline at end of file