@amqp-contract/asyncapi 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -24
- package/docs/index.md +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,30 +60,7 @@ writeFileSync('asyncapi.json', JSON.stringify(asyncAPISpec, null, 2));
|
|
|
60
60
|
|
|
61
61
|
## API
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Generator class for creating AsyncAPI 3.0.0 specifications from AMQP contracts.
|
|
66
|
-
|
|
67
|
-
**Constructor Parameters:**
|
|
68
|
-
|
|
69
|
-
- `options.schemaConverters`: Array of schema converters (e.g., `ZodToJsonSchemaConverter`)
|
|
70
|
-
|
|
71
|
-
**Methods:**
|
|
72
|
-
|
|
73
|
-
- `generate(contract, options)`: Generate an AsyncAPI specification
|
|
74
|
-
- `contract`: The AMQP contract definition
|
|
75
|
-
- `options`: Configuration options
|
|
76
|
-
- `info`: API information (title, version, description, etc.)
|
|
77
|
-
- `servers`: Server configurations (optional)
|
|
78
|
-
- Returns: `Promise<AsyncAPIObject>` - AsyncAPI 3.0.0 document
|
|
79
|
-
|
|
80
|
-
## Features
|
|
81
|
-
|
|
82
|
-
- ✅ Full AsyncAPI 3.0.0 support
|
|
83
|
-
- ✅ Channels from exchanges and queues
|
|
84
|
-
- ✅ Operations for publishers and consumers
|
|
85
|
-
- ✅ Message schemas from Zod schemas
|
|
86
|
-
- ✅ AMQP protocol bindings
|
|
63
|
+
For complete API documentation, see the [AsyncAPI API Reference](https://btravers.github.io/amqp-contract/api/asyncapi).
|
|
87
64
|
|
|
88
65
|
## Documentation
|
|
89
66
|
|
package/docs/index.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
### AsyncAPIGenerator
|
|
10
10
|
|
|
11
|
-
Defined in: [index.ts:92](https://github.com/btravers/amqp-contract/blob/
|
|
11
|
+
Defined in: [index.ts:92](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L92)
|
|
12
12
|
|
|
13
13
|
Generator for creating AsyncAPI 3.0 documentation from AMQP contracts.
|
|
14
14
|
|
|
@@ -65,7 +65,7 @@ const asyncapi = await generator.generate(contract, {
|
|
|
65
65
|
new AsyncAPIGenerator(options): AsyncAPIGenerator;
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Defined in: [index.ts:100](https://github.com/btravers/amqp-contract/blob/
|
|
68
|
+
Defined in: [index.ts:100](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L100)
|
|
69
69
|
|
|
70
70
|
Create a new AsyncAPI generator instance.
|
|
71
71
|
|
|
@@ -87,7 +87,7 @@ Create a new AsyncAPI generator instance.
|
|
|
87
87
|
generate(contract, options): Promise<AsyncAPIObject>;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [index.ts:132](https://github.com/btravers/amqp-contract/blob/
|
|
90
|
+
Defined in: [index.ts:132](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L132)
|
|
91
91
|
|
|
92
92
|
Generate an AsyncAPI 3.0 document from a contract definition.
|
|
93
93
|
|
|
@@ -130,7 +130,7 @@ const asyncapi = await generator.generate(contract, {
|
|
|
130
130
|
|
|
131
131
|
### AsyncAPIGeneratorOptions
|
|
132
132
|
|
|
133
|
-
Defined in: [index.ts:31](https://github.com/btravers/amqp-contract/blob/
|
|
133
|
+
Defined in: [index.ts:31](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L31)
|
|
134
134
|
|
|
135
135
|
Options for configuring the AsyncAPI generator.
|
|
136
136
|
|
|
@@ -149,7 +149,7 @@ const generator = new AsyncAPIGenerator({
|
|
|
149
149
|
|
|
150
150
|
| Property | Type | Description | Defined in |
|
|
151
151
|
| ------ | ------ | ------ | ------ |
|
|
152
|
-
| <a id="schemaconverters"></a> `schemaConverters?` | `ConditionalSchemaConverter`[] | Schema converters for transforming validation schemas to JSON Schema. Supports Zod, Valibot, ArkType, and other Standard Schema v1 compatible libraries. | [index.ts:36](https://github.com/btravers/amqp-contract/blob/
|
|
152
|
+
| <a id="schemaconverters"></a> `schemaConverters?` | `ConditionalSchemaConverter`[] | Schema converters for transforming validation schemas to JSON Schema. Supports Zod, Valibot, ArkType, and other Standard Schema v1 compatible libraries. | [index.ts:36](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L36) |
|
|
153
153
|
|
|
154
154
|
## Type Aliases
|
|
155
155
|
|
|
@@ -159,7 +159,7 @@ const generator = new AsyncAPIGenerator({
|
|
|
159
159
|
type AsyncAPIGeneratorGenerateOptions = Pick<AsyncAPIObject, "id" | "info" | "servers">;
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
Defined in: [index.ts:43](https://github.com/btravers/amqp-contract/blob/
|
|
162
|
+
Defined in: [index.ts:43](https://github.com/btravers/amqp-contract/blob/2e0e3a372088cd269fea97fb73812491d1fc5e14/packages/asyncapi/src/index.ts#L43)
|
|
163
163
|
|
|
164
164
|
Options for generating an AsyncAPI document.
|
|
165
165
|
These correspond to the top-level AsyncAPI document fields.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amqp-contract/asyncapi",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "AsyncAPI specification generator for amqp-contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amqp",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@orpc/openapi": "1.13.0",
|
|
46
46
|
"@standard-schema/spec": "1.1.0",
|
|
47
|
-
"@amqp-contract/contract": "0.3.
|
|
47
|
+
"@amqp-contract/contract": "0.3.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@asyncapi/parser": "3.4.0",
|