@unispechq/unispec-schema 0.3.4 → 0.3.6

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 CHANGED
@@ -135,6 +135,17 @@ Tools may also accept a JSON Pointer form:
135
135
 
136
136
  - `#/service/schemas/<SchemaName>`
137
137
 
138
+ ### Protocol URLs
139
+
140
+ GraphQL and WebSocket protocol definitions may include an optional `url` field.
141
+
142
+ Recommended: relative path (e.g. `/graphql`, `/ws`). Absolute URLs are allowed only if the service is tightly bound to a single host.
143
+
144
+ If omitted, tooling may assume common framework defaults:
145
+
146
+ - GraphQL: `/graphql`
147
+ - WebSocket: `/ws` (or `/socket.io` for Socket.IO)
148
+
138
149
  ## Examples
139
150
 
140
151
  The examples/ directory contains official UniSpec examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unispechq/unispec-schema",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Official UniSpec JSON Schemas",
5
5
  "type": "module",
6
6
  "main": "index.cjs",
@@ -6,7 +6,7 @@
6
6
  "Identifier": {
7
7
  "type": "string",
8
8
  "description": "Identifier for services, operations, channels, etc.",
9
- "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
9
+ "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]*$"
10
10
  },
11
11
  "Description": {
12
12
  "type": "string",
@@ -28,6 +28,10 @@
28
28
  }
29
29
  },
30
30
  "properties": {
31
+ "url": {
32
+ "type": "string",
33
+ "description": "Optional path or URL of the GraphQL endpoint. Recommended: relative path (e.g. '/graphql'). Absolute URLs are allowed only if the service is tightly bound to a single host. If omitted, tooling may assume a framework default (commonly '/graphql')."
34
+ },
31
35
  "schema": {
32
36
  "type": "string",
33
37
  "description": "GraphQL schema SDL as a string. Canonical source of type definitions."
@@ -68,6 +68,10 @@
68
68
  }
69
69
  },
70
70
  "properties": {
71
+ "url": {
72
+ "type": "string",
73
+ "description": "Optional path or URL of the WebSocket endpoint. Recommended: relative path (e.g. '/ws' or '/socket.io' for Socket.IO). Absolute URLs are allowed only if the service is tightly bound to a single host. If omitted, tooling may assume a framework default (commonly '/ws' for WebSocket servers or '/socket.io' for Socket.IO)."
74
+ },
71
75
  "channels": {
72
76
  "type": "array",
73
77
  "description": "WebSocket channels/topics exposed by the service.",