@omnigraph/openapi 1.0.0-alpha-20230522113302-1be07c093 → 1.0.0-alpha-20230523152942-a5cee44a7
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.
|
@@ -62,7 +62,8 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
62
62
|
if (method === 'parameters' ||
|
|
63
63
|
method === 'summary' ||
|
|
64
64
|
method === 'description' ||
|
|
65
|
-
method === 'servers'
|
|
65
|
+
method === 'servers' ||
|
|
66
|
+
method.startsWith('x-')) {
|
|
66
67
|
continue;
|
|
67
68
|
}
|
|
68
69
|
const methodObj = pathObj[method];
|
|
@@ -129,6 +130,13 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
129
130
|
operationConfig.queryStringOptionsByParam[paramObj.name].arrayFormat = 'comma';
|
|
130
131
|
break;
|
|
131
132
|
default:
|
|
133
|
+
if (paramObj.style === undefined && paramObj.schema.type === 'array') {
|
|
134
|
+
// when params is array and style is not defined, we assume it is form style.
|
|
135
|
+
// it is how swagger editor behaves
|
|
136
|
+
operationConfig.queryStringOptionsByParam[paramObj.name].arrayFormat =
|
|
137
|
+
'comma';
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
132
140
|
logger.warn(`Other styles including ${paramObj.style} of query parameters are not supported yet.`);
|
|
133
141
|
}
|
|
134
142
|
}
|
|
@@ -59,7 +59,8 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
59
59
|
if (method === 'parameters' ||
|
|
60
60
|
method === 'summary' ||
|
|
61
61
|
method === 'description' ||
|
|
62
|
-
method === 'servers'
|
|
62
|
+
method === 'servers' ||
|
|
63
|
+
method.startsWith('x-')) {
|
|
63
64
|
continue;
|
|
64
65
|
}
|
|
65
66
|
const methodObj = pathObj[method];
|
|
@@ -126,6 +127,13 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
126
127
|
operationConfig.queryStringOptionsByParam[paramObj.name].arrayFormat = 'comma';
|
|
127
128
|
break;
|
|
128
129
|
default:
|
|
130
|
+
if (paramObj.style === undefined && paramObj.schema.type === 'array') {
|
|
131
|
+
// when params is array and style is not defined, we assume it is form style.
|
|
132
|
+
// it is how swagger editor behaves
|
|
133
|
+
operationConfig.queryStringOptionsByParam[paramObj.name].arrayFormat =
|
|
134
|
+
'comma';
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
129
137
|
logger.warn(`Other styles including ${paramObj.style} of query parameters are not supported yet.`);
|
|
130
138
|
}
|
|
131
139
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnigraph/openapi",
|
|
3
|
-
"version": "1.0.0-alpha-
|
|
3
|
+
"version": "1.0.0-alpha-20230523152942-a5cee44a7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@graphql-mesh/cross-helpers": "0.4.0-alpha-
|
|
7
|
-
"@graphql-mesh/types": "1.0.0-alpha-
|
|
8
|
-
"@graphql-mesh/utils": "1.0.0-alpha-
|
|
6
|
+
"@graphql-mesh/cross-helpers": "0.4.0-alpha-20230523152942-a5cee44a7",
|
|
7
|
+
"@graphql-mesh/types": "1.0.0-alpha-20230523152942-a5cee44a7",
|
|
8
|
+
"@graphql-mesh/utils": "1.0.0-alpha-20230523152942-a5cee44a7",
|
|
9
9
|
"graphql": "*",
|
|
10
10
|
"tslib": "^2.4.0"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@graphql-mesh/string-interpolation": "0.5.0-alpha-
|
|
14
|
-
"@omnigraph/json-schema": "1.0.0-alpha-
|
|
13
|
+
"@graphql-mesh/string-interpolation": "0.5.0-alpha-20230523152942-a5cee44a7",
|
|
14
|
+
"@omnigraph/json-schema": "1.0.0-alpha-20230523152942-a5cee44a7",
|
|
15
15
|
"change-case": "^4.1.2",
|
|
16
|
-
"json-machete": "1.0.0-alpha-
|
|
16
|
+
"json-machete": "1.0.0-alpha-20230523152942-a5cee44a7",
|
|
17
17
|
"openapi-types": "^12.1.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|