diff --git a/helpers/all.js b/helpers/all.js index 732fbb6c6..efff21037 100644 --- a/helpers/all.js +++ b/helpers/all.js @@ -33,7 +33,7 @@ function mergeInto(from, to) { * Prepares configuration for component. */ export function prepareConfiguration(params = {}) { - const config = { show: { sidebar: false }, sidebar: { showOperations: 'byDefault' } }; + const config = { show: { sidebar: true }, sidebar: { showOperations: 'byDefault' } }; // Apply config override if (params.config) { let configOverride; diff --git a/package-lock.json b/package-lock.json index c7d627d4f..95aed107f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@asyncapi/generator-react-sdk": "^1.0.0", "@asyncapi/parser": "^3.0.0-next-major-spec.2", - "@asyncapi/react-component": "^1.0.0-next.53", + "@asyncapi/react-component": "^1.0.0-next.54", "highlight.js": "10.7.3", "puppeteer": "^14.1.0", "react-dom": "^17.0.2", @@ -656,9 +656,9 @@ } }, "node_modules/@asyncapi/react-component": { - "version": "1.0.0-next.53", - "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.0-next.53.tgz", - "integrity": "sha512-r0zHFlIn5sgPZzdCgQnaRCtTcAt2UlmT/uzYtiUehkhVxk5gwuUcRHKcZxcX/zSdn8ZaEBa4708hqnoXVa6wNw==", + "version": "1.0.0-next.54", + "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.0-next.54.tgz", + "integrity": "sha512-ign7m7Pt+xQEiYdcA/pABC/Qxpl9lILs3utNTjivEstL5zb2RprQpotHwWmZDLmvbHlmycD3n34xhfoFkRUmHA==", "dependencies": { "@asyncapi/avro-schema-parser": "3.0.3", "@asyncapi/openapi-schema-parser": "3.0.4", diff --git a/package.json b/package.json index 9c39c60e2..13b50a942 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "@asyncapi/generator-react-sdk": "^1.0.0", - "@asyncapi/react-component": "^1.0.0-next.53", + "@asyncapi/react-component": "^1.0.0-next.54", "@asyncapi/parser": "^3.0.0-next-major-spec.2", "highlight.js": "10.7.3", "puppeteer": "^14.1.0", diff --git a/test/components/__snapshots__/index.test.js.snap b/test/components/__snapshots__/index.test.js.snap index d18f3141a..17c43ac02 100644 --- a/test/components/__snapshots__/index.test.js.snap +++ b/test/components/__snapshots__/index.test.js.snap @@ -14,7 +14,92 @@ exports[`Index component should render AsyncAPI v2 document 1`] = `
- +The Smartylighting Streetlights API allows you to remotely manage the city lights.
+Test broker
+Secure connection (TLS) is available through port 8883.
+The topic on which measured values may be produced and consumed.
+Inform about environmental lighting conditions of a particular streetlight.
This is the description with bold text.
+On multiple lines.
+Available only on servers:
The ID of the streetlight.
+Accepts the following message:
Inform about environmental lighting conditions of a particular streetlight.
Light intensity measured in lumens.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
{
+ \\"lumens\\": 0,
+ \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
+}
+
+{
+ \\"my-app-header\\": 100
+}
+
+Available only on servers:
The ID of the streetlight.
+Accepts the following message:
Command a particular streetlight to turn the lights on or off.
Whether to turn on or off the light.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
{
+ \\"command\\": \\"on\\",
+ \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
+}
+
+{
+ \\"my-app-header\\": 100
+}
+
+Available only on servers:
The ID of the streetlight.
+Accepts the following message:
Command a particular streetlight to turn the lights on or off.
Whether to turn on or off the light.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
{
+ \\"command\\": \\"on\\",
+ \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
+}
+
+{
+ \\"my-app-header\\": 100
+}
+
+Available only on servers:
The ID of the streetlight.
+Accepts the following message:
Command a particular streetlight to dim the lights.
Percentage to which the light should be dimmed to.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
{
+ \\"percentage\\": 100,
+ \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
+}
+
+{
+ \\"my-app-header\\": 100
+}
+
+this description shows in markdown
+Available only on servers:
Accepts one of the following messages:
{
+ \\"result\\": \\"success\\"
+}
+
+Additional properties are allowed.
Additional properties are allowed.
{
+ \\"error\\": {
+ \\"errorCode\\": 404,
+ \\"errorMessage\\": \\"Something messed up\\"
+ }
+}
+
+Inform about environmental lighting conditions of a particular streetlight.
Light intensity measured in lumens.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
Command a particular streetlight to turn the lights on or off.
Whether to turn on or off the light.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
Command a particular streetlight to dim the lights.
Percentage to which the light should be dimmed to.
+Date and time when the message was sent.
+Additional properties are allowed.
Additional properties are allowed.
Additional properties are allowed.
Additional properties are allowed.
Additional properties are allowed.
Light intensity measured in lumens.
+Date and time when the message was sent.
+Additional properties are allowed.
Whether to turn on or off the light.
+Date and time when the message was sent.
+Additional properties are allowed.
Percentage to which the light should be dimmed to.
+Date and time when the message was sent.
+Additional properties are allowed.
Date and time when the message was sent.
+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.
+Kafka STAGING cluster for uat
and preprod
environments
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.
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.
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.
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).
+A unique Message ID.
+A unique Request ID needed to define a CORRELATION_ID
for exchanges, which will be sent back in the Costing Responses.
A unique Correlation ID defined from the REQUEST_ID
or the MESSAGE_ID
provided in the Costing Request.
The Business Unit code for which data are applicable.
+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 woker that has thrown the error.
+The error message describing the error.
+The error code.
+