@bagelink/sdk 1.8.3 → 1.8.5
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/dist/index.cjs +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
- package/src/openAPITools/streamDetector.ts +9 -1
package/dist/index.cjs
CHANGED
|
@@ -70,7 +70,11 @@ function extractSSEEventInfo(operation) {
|
|
|
70
70
|
const fields = [];
|
|
71
71
|
const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm);
|
|
72
72
|
for (const fieldMatch of fieldMatches) {
|
|
73
|
-
|
|
73
|
+
let [, fieldName, fieldDescription] = fieldMatch;
|
|
74
|
+
if (fieldName.includes(".")) {
|
|
75
|
+
const parts = fieldName.split(".");
|
|
76
|
+
fieldName = parts[parts.length - 1];
|
|
77
|
+
}
|
|
74
78
|
fields.push({
|
|
75
79
|
name: fieldName,
|
|
76
80
|
description: fieldDescription.trim()
|
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,11 @@ function extractSSEEventInfo(operation) {
|
|
|
64
64
|
const fields = [];
|
|
65
65
|
const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm);
|
|
66
66
|
for (const fieldMatch of fieldMatches) {
|
|
67
|
-
|
|
67
|
+
let [, fieldName, fieldDescription] = fieldMatch;
|
|
68
|
+
if (fieldName.includes(".")) {
|
|
69
|
+
const parts = fieldName.split(".");
|
|
70
|
+
fieldName = parts[parts.length - 1];
|
|
71
|
+
}
|
|
68
72
|
fields.push({
|
|
69
73
|
name: fieldName,
|
|
70
74
|
description: fieldDescription.trim()
|
package/package.json
CHANGED
|
@@ -154,7 +154,15 @@ export function extractSSEEventInfo(operation: OpenAPIOperation): SSEEventTypeIn
|
|
|
154
154
|
const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm)
|
|
155
155
|
|
|
156
156
|
for (const fieldMatch of fieldMatches) {
|
|
157
|
-
|
|
157
|
+
let [, fieldName, fieldDescription] = fieldMatch
|
|
158
|
+
|
|
159
|
+
// Handle nested field names like "error.code" → extract just "code"
|
|
160
|
+
// This handles documentation that shows nested object paths
|
|
161
|
+
if (fieldName.includes('.')) {
|
|
162
|
+
const parts = fieldName.split('.')
|
|
163
|
+
fieldName = parts[parts.length - 1] // Take the last part
|
|
164
|
+
}
|
|
165
|
+
|
|
158
166
|
fields.push({
|
|
159
167
|
name: fieldName,
|
|
160
168
|
description: fieldDescription.trim(),
|