diff --git a/helpers/all.js b/helpers/all.js index f1a4782ac..2a14b69cb 100644 --- a/helpers/all.js +++ b/helpers/all.js @@ -3,7 +3,7 @@ import fs from 'fs'; import ReactDOMServer from 'react-dom/server'; import fetch from 'sync-fetch'; import AsyncApiComponent, { hljs } from '@asyncapi/react-component'; -import { AsyncAPIDocumentInterface } from '@asyncapi/parser'; +import { AsyncAPIDocumentInterface, stringify } from '@asyncapi/parser'; function isJsonObject(o) { return o && typeof o === 'object' && !Array.isArray(o); @@ -133,7 +133,7 @@ export function includeFile(pathFile) { * and annotates that specification is parsed. */ export function stringifySpec(asyncapi) { - return JSON.stringify(asyncapi.json()); + return stringify(asyncapi); } /** diff --git a/test/components/__snapshots__/index.test.js.snap b/test/components/__snapshots__/index.test.js.snap index 17c43ac02..0f133aefd 100644 --- a/test/components/__snapshots__/index.test.js.snap +++ b/test/components/__snapshots__/index.test.js.snap @@ -104,434 +104,7 @@ exports[`Index component should render AsyncAPI v2 document 1`] = ` @@ -553,8 +126,8 @@ exports[`Index component should render AsyncAPI v3 document 1`] = `
-This Adeo specification illustrates how ADEO uses AsyncAPI to document some of their exchanges
Kafka PRODUCTION cluster
Use SASL authentication with SSL encryption to connect to the ADEO Broker.
@@ -562,47 +135,7 @@ exports[`Index component should render AsyncAPI v3 document 1`] = `Use SASL authentication with SSL encryption to connect to the ADEO Broker.
Kafka DEV cluster for dev
and sit
environments
Use SASL authentication with SSL encryption to connect to the ADEO Broker.
-Use this topic to do a Costing Request to Costing product. We use the RecordNameStrategy to infer the messages schema. You have to define x-value.subject.name.strategy
to io.confluent.kafka.serializers.subject.RecordNameStrategy
in your producer to use the schema we manage. The schema below illustrates how Costing Request messages are handled.
[COSTING] Request one or more Costing calculation for any product -
You can try a costing request using our Conduktor producer template
-Available only on servers:
Adeo Kafka Environment for messages publications.
-the topic version you want to use
-The groupId must be prefixed by your svc
account, deliver by the Adeo Kafka team. This svc
must have the write access to the topic.
We use the RecordNameStrategy to infer the messages schema. Use x-value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy
in your producer configuration.
Accepts the following message:
Costing Request V1 inputs.
This correlation ID is used for message tracing and messages correlation. This correlation ID is generated at runtime based on the REQUEST_ID
and sent to the RESPONSE message.
A unique Request ID needed to define a CORRELATION_ID
for exchanges, which will be sent back in the Costing Responses.
The Kafka topic where to send the Costing Response. This is required for the Return Address EIP pattern. You must grant WRITE access to our svc-ccr-app
service account.
The Costing requester service account used to produce costing request.
-The Costing requester code (generally the BU Code). The requester code is useful to get the dedicated context (tenant).
-Additional properties are allowed.
{
- \\"REQUEST_ID\\": \\"1fa6ef40-8f47-40a8-8cf6-f8607d0066ef\\",
- \\"REPLY_TOPIC\\": \\"adeo-case-study-COSTING-RESPONSE-V1\\",
- \\"REQUESTER_ID\\": \\"svc-ecollect-app\\",
- \\"REQUESTER_CODE\\": 1
-}
-
-This topic is used to REPLY Costing Requests and is targeted by the REPLY_TOPIC
header. You must grant PUBLISH access to our svc-ccr-app
service account.. We use the RecordNameStrategy to infer the messages schema. You have to define key.subject.name.strategy
and x-value.subject.name.strategy
to io.confluent.kafka.serializers.subject.RecordNameStrategy
in your consumer. The schema below illustrates how Costing Response messages are handled.
-
[COSTING] Get the costing responses matching an initial Costing Request. -
Available only on servers:
Adeo Kafka Environment for messages publications.
-the topic version you want to use
-We use the RecordNameStrategy to infer the messages schema. Use x-key.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy
in your consumer configuration.
We use the RecordNameStrategy to infer the messages schema. Use x-value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy
in your consumer configuration.
The groupId must be prefixed by your svc
account, deliver by the Adeo Kafka team. This svc
must have the read access to the topic.
Accepts the following message:
Costing Response ouputs.
This correlation ID is used for message tracing and messages correlation. This correlation ID is generated at runtime based on the REQUEST_ID
and sent to the RESPONSE message.
Please refer to the CostingResponseKey.avsc
schema, available on our github project.
A unique Message ID.
-A unique Correlation ID defined from the REQUEST_ID
or the MESSAGE_ID
provided in the Costing Request.
Timestamp of the costing request
-Technical timestamp for the costing calculation
-Additional properties are allowed.
{
- \\"CALCULATION_ID\\": \\"1fa6ef40-8f47-40a8-8cf6-f8607d0066ef\\",
- \\"CORRELATION_ID\\": \\"1fa6ef40-8f47-40a8-8cf6-f8607d0066ef\\",
- \\"REQUEST_TIMESTAMP\\": \\"2019-08-24T14:15:22Z\\",
- \\"CALCULATION_TIMESTAMP\\": \\"2019-08-24T14:15:22Z\\"
-}
-
-Costing Request V1 inputs.
This correlation ID is used for message tracing and messages correlation. This correlation ID is generated at runtime based on the REQUEST_ID
and sent to the RESPONSE message.
Costing Request V1 inputs.
This correlation ID is used for message tracing and messages correlation. This correlation ID is generated at runtime based on the REQUEST_ID
and sent to the RESPONSE message.
A unique Request ID needed to define a CORRELATION_ID
for exchanges, which will be sent back in the Costing Responses.
The Kafka topic where to send the Costing Response. This is required for the Return Address EIP pattern. You must grant WRITE access to our svc-ccr-app
service account.
The Costing requester service account used to produce costing request.
@@ -628,602 +161,7 @@ exports[`Index component should render AsyncAPI v3 document 1`] = `