8484 ⇒ <code>Array.<JSX.Element></code>
8585 </dt >
8686 <dd >
87- <p>Renders a query parameter variables code blocks.</p>
87+ <p>Renders query parameter variables code blocks.</p>
8888 </dd >
8989 <dt >
9090 <a href="#AvailableOperations">AvailableOperations</a>
@@ -145,7 +145,7 @@ provided AsyncAPI document, generator parameters, and target language.</p>
145145 ⇒ <code>JSX.Element</code>
146146 </dt >
147147 <dd >
148- <p>Renders a usage example snippet for a generated client in a given language.</p>
148+ <p>Renders a usage example snippet for a generated WebSocket client in a given language.</p>
149149 </dd >
150150 <dt >
151151 <a href="#RegisterErrorHandler">RegisterErrorHandler</a>
@@ -204,7 +204,7 @@ Renders a WebSocket close connection method with optional pre- and post-executio
204204const language = " java" ;
205205const framework = " quarkus" ;
206206const methodName = " terminateConnection" ;
207- const methodParams = [" self " ];
207+ const methodParams = [" String reason " ];
208208const preExecutionCode = " // About to terminate connection" ;
209209const postExecutionCode = " // Connection terminated" ;
210210const indent = 2 ;
@@ -314,8 +314,8 @@ Renders a file header with metadata information such as title, version, protocol
314314| Name | Type | Description |
315315| ------| ------| -------------|
316316| props | <code >Object</code > | Component props. |
317- | props.info | <code >object </code > | Info object from the AsyncAPI document. |
318- | props.server | <code >object </code > | Server object from the AsyncAPI document. |
317+ | props.info | <code >Object </code > | Info object from the AsyncAPI document. |
318+ | props.server | <code >Object </code > | Server object from the AsyncAPI document. |
319319| props.language | <code >Language</code > | Programming language used for comment formatting. |
320320
321321
@@ -386,7 +386,7 @@ Renders a WebSocket message handler method with optional pre- and post-execution
386386``` js
387387const language = " javascript" ;
388388const methodName = " handleMessage" ;
389- const methodParams = [" self " , " message " ];
389+ const methodParams = [" message " , " cb " ];
390390const preExecutionCode = " // Pass the incoming message to all registered message handlers." ;
391391const postExecutionCode = " // Passed the incoming message to all registered message handlers." ;
392392const customMethodConfig = {
@@ -445,7 +445,7 @@ Renders a language-specific formatted method definition.
445445``` js
446446const language = " java" ;
447447const methodName = " registerHandler" ;
448- const methodParams = [" self " , " handler" ];
448+ const methodParams = [" Handler handler" ];
449449const methodDocs = " // Process the input data." ;
450450const methodLogic = " // TODO: implement" ;
451451const preExecutionCode = " // Before handler registration" ;
@@ -485,8 +485,8 @@ Renders an array of model files based on the AsyncAPI document.
485485| params.asyncapi | <code >AsyncAPIDocumentInterface</code > | Parsed AsyncAPI document object. |
486486| params.language | <code >Language</code > | Target programming language for the generated models. |
487487| params.format | <code >Format</code > | Naming format for generated files. |
488- | params.presets | <code >object </code > | Custom presets for the generator instance. |
489- | params.constraints | <code >object </code > | Custom constraints for the generator instance. |
488+ | params.presets | <code >Object </code > | Custom presets for the generator instance. |
489+ | params.constraints | <code >Object </code > | Custom constraints for the generator instance. |
490490
491491
492492
@@ -670,7 +670,7 @@ return (
670670
671671<a name =" QueryParamsVariables " ></a >
672672## ** QueryParamsVariables()**
673- Renders a query parameter variables code blocks.
673+ Renders query parameter variables code blocks.
674674
675675
676676### Parameters
@@ -737,7 +737,7 @@ Renders a list of AsyncAPI operations with their headers and message examples.
737737| Name | Type | Description |
738738| ------| ------| -------------|
739739| props | <code >Object</code > | Component Props |
740- | props.operations | <code >Array.< ; object > ; </code > | Array of AsyncAPI Operation objects. |
740+ | props.operations | <code >Array.< ; Object > ; </code > | Array of AsyncAPI Operation objects. |
741741
742742
743743
@@ -752,6 +752,7 @@ Renders a list of AsyncAPI operations with their headers and message examples.
752752``` js
753753import path from " path" ;
754754import { Parser , fromFile } from " @asyncapi/parser" ;
755+ import { AvailableOperations } from " @asyncapi/generator-components" ;
755756
756757async function renderAvailableOperations (){
757758 const parser = new Parser ();
@@ -843,7 +844,7 @@ Renders Message Examples of a given AsyncAPI operation.
843844| Name | Type | Description |
844845| ------| ------| -------------|
845846| props | <code >Object</code > | Component Props |
846- | props.operation | <code >object </code > | An AsyncAPI Operation object. |
847+ | props.operation | <code >Object </code > | An AsyncAPI Operation object. |
847848
848849
849850
@@ -858,6 +859,7 @@ Renders Message Examples of a given AsyncAPI operation.
858859``` js
859860import path from " path" ;
860861import { Parser , fromFile } from " @asyncapi/parser" ;
862+ import { MessageExamples } from " @asyncapi/generator-components" ;
861863
862864async function renderMessageExamples (){
863865 const parser = new Parser ();
@@ -890,7 +892,7 @@ Renders a header section for a single AsyncAPI operation.
890892| Name | Type | Description |
891893| ------| ------| -------------|
892894| props | <code >Object</code > | Component properties. |
893- | props.operation | <code >object </code > | An AsyncAPI Operation object. |
895+ | props.operation | <code >Object </code > | An AsyncAPI Operation object. |
894896
895897
896898
@@ -905,6 +907,7 @@ Renders a header section for a single AsyncAPI operation.
905907``` js
906908import path from " path" ;
907909import { Parser , fromFile } from " @asyncapi/parser" ;
910+ import { OperationHeader } from " @asyncapi/generator-components" ;
908911
909912async function renderOperationHeader (){
910913 const parser = new Parser ();
@@ -938,7 +941,7 @@ Displays the API description, version, and server URL.
938941| Name | Type | Description |
939942| ------| ------| -------------|
940943| props | <code >Object</code > | Component props |
941- | props.info | <code >object </code > | Info object from the AsyncAPI document. |
944+ | props.info | <code >Object </code > | Info object from the AsyncAPI document. |
942945| props.title | <code >string</code > | Title from the AsyncAPI document. |
943946| props.serverUrl | <code >string</code > | ServerUrl from a specific server from the AsyncAPI document. |
944947
@@ -956,6 +959,7 @@ Displays the API description, version, and server URL.
956959import path from " path" ;
957960import { Parser , fromFile } from " @asyncapi/parser" ;
958961import { getServer , getServerUrl } from ' @asyncapi/generator-helpers' ;
962+ import { Overview } from " @asyncapi/generator-components" ;
959963
960964async function renderOverview (){
961965 const parser = new Parser ();
@@ -999,7 +1003,7 @@ provided AsyncAPI document, generator parameters, and target language.
9991003| ------| ------| -------------|
10001004| props | <code >Object</code > | Component props |
10011005| props.asyncapi | <code >AsyncAPIDocumentInterface</code > | Parsed AsyncAPI document instance. |
1002- | props.params | <code >object </code > | Generator parameters used to customize output |
1006+ | props.params | <code >Object </code > | Generator parameters used to customize output |
10031007| props.language | <code >Language</code > | Target language used to render language-specific sections. |
10041008
10051009
@@ -1016,6 +1020,7 @@ provided AsyncAPI document, generator parameters, and target language.
10161020import path from " path" ;
10171021import { Parser , fromFile } from " @asyncapi/parser" ;
10181022import { buildParams } from ' @asyncapi/generator-helpers' ;
1023+ import { Readme } from " @asyncapi/generator-components" ;
10191024
10201025async function renderReadme (){
10211026 const parser = new Parser ();
@@ -1044,7 +1049,7 @@ renderReadme().catch(console.error);
10441049
10451050<a name =" Usage " ></a >
10461051## ** Usage()**
1047- Renders a usage example snippet for a generated client in a given language.
1052+ Renders a usage example snippet for a generated WebSocket client in a given language.
10481053
10491054
10501055### Parameters
0 commit comments