@unispechq/unispec-core 0.2.12 → 0.2.14

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.
@@ -186,6 +186,7 @@ function toWebSocketModel(doc) {
186
186
  name: channel.name,
187
187
  summary: undefined,
188
188
  description: channel.description,
189
+ namespace: channel.namespace,
189
190
  direction: channel.direction,
190
191
  messages: channel.messages,
191
192
  raw: channel,
@@ -396,7 +396,7 @@ exports.GENERATED_SCHEMAS = {
396
396
  "Identifier": {
397
397
  "type": "string",
398
398
  "description": "Identifier for services, operations, channels, etc.",
399
- "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
399
+ "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]*$"
400
400
  },
401
401
  "Description": {
402
402
  "type": "string",
@@ -758,6 +758,10 @@ exports.GENERATED_SCHEMAS = {
758
758
  "description": {
759
759
  "$ref": "./common.schema.json#/$defs/Description"
760
760
  },
761
+ "namespace": {
762
+ "type": "string",
763
+ "description": "Optional namespace for the channel (e.g. 'chat', 'notifications'). Used to group related channels and avoid name collisions."
764
+ },
761
765
  "direction": {
762
766
  "type": "string",
763
767
  "description": "Direction of message flow on this channel.",
@@ -181,6 +181,7 @@ export function toWebSocketModel(doc) {
181
181
  name: channel.name,
182
182
  summary: undefined,
183
183
  description: channel.description,
184
+ namespace: channel.namespace,
184
185
  direction: channel.direction,
185
186
  messages: channel.messages,
186
187
  raw: channel,
@@ -21,6 +21,7 @@ export interface UniSpecWebSocketMessage {
21
21
  export interface UniSpecWebSocketChannel {
22
22
  name: string;
23
23
  description?: string;
24
+ namespace?: string;
24
25
  direction?: "publish" | "subscribe" | "both";
25
26
  messages?: UniSpecWebSocketMessage[];
26
27
  security?: UniSpecSecurityRequirement[];
@@ -763,6 +763,10 @@ export declare const GENERATED_SCHEMAS: {
763
763
  description: {
764
764
  $ref: string;
765
765
  };
766
+ namespace: {
767
+ type: string;
768
+ description: string;
769
+ };
766
770
  direction: {
767
771
  type: string;
768
772
  description: string;
@@ -393,7 +393,7 @@ export const GENERATED_SCHEMAS = {
393
393
  "Identifier": {
394
394
  "type": "string",
395
395
  "description": "Identifier for services, operations, channels, etc.",
396
- "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
396
+ "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]*$"
397
397
  },
398
398
  "Description": {
399
399
  "type": "string",
@@ -755,6 +755,10 @@ export const GENERATED_SCHEMAS = {
755
755
  "description": {
756
756
  "$ref": "./common.schema.json#/$defs/Description"
757
757
  },
758
+ "namespace": {
759
+ "type": "string",
760
+ "description": "Optional namespace for the channel (e.g. 'chat', 'notifications'). Used to group related channels and avoid name collisions."
761
+ },
758
762
  "direction": {
759
763
  "type": "string",
760
764
  "description": "Direction of message flow on this channel.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unispechq/unispec-core",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Central UniSpec Core Engine providing parsing, validation, normalization, diffing, and conversion of UniSpec specs.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,7 +49,7 @@
49
49
  "release:major": "node scripts/release.js major"
50
50
  },
51
51
  "dependencies": {
52
- "@unispechq/unispec-schema": "^0.3.5",
52
+ "@unispechq/unispec-schema": "^0.3.7",
53
53
  "ajv": "^8.12.0"
54
54
  },
55
55
  "optionalDependencies": {