@omnigraph/openapi 0.108.20-alpha-20250212163616-eb8c0ccf7a3767d2a8a55cf4bf46c6c9c1b64ec4 → 0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331
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.
|
@@ -16,7 +16,7 @@ const defaultHateoasConfig = {
|
|
|
16
16
|
linkObjectExtensionIdentifier: 'x-links',
|
|
17
17
|
};
|
|
18
18
|
const futureLinks = new Set();
|
|
19
|
-
async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch
|
|
19
|
+
async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new utils_1.DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
|
|
20
20
|
const hateOasConfig = HATEOAS === true
|
|
21
21
|
? defaultHateoasConfig
|
|
22
22
|
: HATEOAS === false
|
|
@@ -39,7 +39,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
39
39
|
let oasOrSwagger;
|
|
40
40
|
const readFileOrUrlForJsonMachete = (path, opts) => (0, utils_1.readFileOrUrl)(path, {
|
|
41
41
|
cwd: opts.cwd,
|
|
42
|
-
fetch
|
|
42
|
+
fetch,
|
|
43
43
|
headers: schemaHeadersFactory({ env: cross_helpers_1.process.env }),
|
|
44
44
|
importFn: utils_1.defaultImportFn,
|
|
45
45
|
logger,
|
|
@@ -50,6 +50,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
50
50
|
$ref: source,
|
|
51
51
|
}, {
|
|
52
52
|
cwd,
|
|
53
|
+
fetch,
|
|
53
54
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
54
55
|
debugLogFn: logger.debug.bind(logger),
|
|
55
56
|
}));
|
|
@@ -59,6 +60,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
59
60
|
cwd,
|
|
60
61
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
61
62
|
debugLogFn: logger.debug.bind(logger),
|
|
63
|
+
fetch,
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
(0, json_machete_1.handleUntitledDefinitions)(oasOrSwagger);
|
|
@@ -547,6 +549,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
547
549
|
cwd,
|
|
548
550
|
root: oasOrSwagger,
|
|
549
551
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
552
|
+
fetch,
|
|
550
553
|
});
|
|
551
554
|
responseByStatusCode[responseKey].links = responseByStatusCode[responseKey].links || {};
|
|
552
555
|
for (const linkName in dereferencedLinkObj.links) {
|
|
@@ -661,7 +664,7 @@ async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFo
|
|
|
661
664
|
operations,
|
|
662
665
|
endpoint,
|
|
663
666
|
cwd,
|
|
664
|
-
fetch
|
|
667
|
+
fetch,
|
|
665
668
|
schemaHeaders,
|
|
666
669
|
operationHeaders,
|
|
667
670
|
};
|
|
@@ -13,7 +13,7 @@ const defaultHateoasConfig = {
|
|
|
13
13
|
linkObjectExtensionIdentifier: 'x-links',
|
|
14
14
|
};
|
|
15
15
|
const futureLinks = new Set();
|
|
16
|
-
export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch
|
|
16
|
+
export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams = {}, selectQueryOrMutationField = [], logger = new DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), jsonApi, HATEOAS, }) {
|
|
17
17
|
const hateOasConfig = HATEOAS === true
|
|
18
18
|
? defaultHateoasConfig
|
|
19
19
|
: HATEOAS === false
|
|
@@ -36,7 +36,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
36
36
|
let oasOrSwagger;
|
|
37
37
|
const readFileOrUrlForJsonMachete = (path, opts) => readFileOrUrl(path, {
|
|
38
38
|
cwd: opts.cwd,
|
|
39
|
-
fetch
|
|
39
|
+
fetch,
|
|
40
40
|
headers: schemaHeadersFactory({ env: process.env }),
|
|
41
41
|
importFn: defaultImportFn,
|
|
42
42
|
logger,
|
|
@@ -47,6 +47,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
47
47
|
$ref: source,
|
|
48
48
|
}, {
|
|
49
49
|
cwd,
|
|
50
|
+
fetch,
|
|
50
51
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
51
52
|
debugLogFn: logger.debug.bind(logger),
|
|
52
53
|
}));
|
|
@@ -56,6 +57,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
56
57
|
cwd,
|
|
57
58
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
58
59
|
debugLogFn: logger.debug.bind(logger),
|
|
60
|
+
fetch,
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
handleUntitledDefinitions(oasOrSwagger);
|
|
@@ -544,6 +546,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
544
546
|
cwd,
|
|
545
547
|
root: oasOrSwagger,
|
|
546
548
|
readFileOrUrl: readFileOrUrlForJsonMachete,
|
|
549
|
+
fetch,
|
|
547
550
|
});
|
|
548
551
|
responseByStatusCode[responseKey].links = responseByStatusCode[responseKey].links || {};
|
|
549
552
|
for (const linkName in dereferencedLinkObj.links) {
|
|
@@ -658,7 +661,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions(name, { source, fal
|
|
|
658
661
|
operations,
|
|
659
662
|
endpoint,
|
|
660
663
|
cwd,
|
|
661
|
-
fetch
|
|
664
|
+
fetch,
|
|
662
665
|
schemaHeaders,
|
|
663
666
|
operationHeaders,
|
|
664
667
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnigraph/openapi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-mesh/cross-helpers": "^0.4.
|
|
10
|
-
"@graphql-mesh/fusion-composition": "0.
|
|
9
|
+
"@graphql-mesh/cross-helpers": "^0.4.9",
|
|
10
|
+
"@graphql-mesh/fusion-composition": "0.8.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
11
11
|
"@graphql-mesh/string-interpolation": "^0.5.8",
|
|
12
|
-
"@graphql-mesh/types": "0.
|
|
13
|
-
"@graphql-mesh/utils": "0.
|
|
12
|
+
"@graphql-mesh/types": "0.104.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
13
|
+
"@graphql-mesh/utils": "0.104.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
14
14
|
"@graphql-tools/utils": "^10.6.4",
|
|
15
|
-
"@omnigraph/json-schema": "0.
|
|
15
|
+
"@omnigraph/json-schema": "0.109.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
16
16
|
"change-case": "^4.1.2",
|
|
17
|
-
"json-machete": "
|
|
17
|
+
"json-machete": "0.98.0-alpha-20250124181238-87366ee8e2a95025d881bdaba556f04d337e8331",
|
|
18
18
|
"openapi-types": "^12.1.0",
|
|
19
19
|
"tslib": "^2.4.0"
|
|
20
20
|
},
|
|
@@ -34,7 +34,7 @@ interface GetJSONSchemaOptionsFromOpenAPIOptionsParams {
|
|
|
34
34
|
jsonApi?: boolean;
|
|
35
35
|
HATEOAS?: Partial<HATEOASConfig> | boolean;
|
|
36
36
|
}
|
|
37
|
-
export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch
|
|
37
|
+
export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
|
|
38
38
|
operations: JSONSchemaOperationConfig[];
|
|
39
39
|
endpoint: string;
|
|
40
40
|
cwd: string;
|
|
@@ -34,7 +34,7 @@ interface GetJSONSchemaOptionsFromOpenAPIOptionsParams {
|
|
|
34
34
|
jsonApi?: boolean;
|
|
35
35
|
HATEOAS?: Partial<HATEOASConfig> | boolean;
|
|
36
36
|
}
|
|
37
|
-
export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch
|
|
37
|
+
export declare function getJSONSchemaOptionsFromOpenAPIOptions(name: string, { source, fallbackFormat, cwd, fetch, endpoint, schemaHeaders, operationHeaders, queryParams, selectQueryOrMutationField, logger, jsonApi, HATEOAS, }: GetJSONSchemaOptionsFromOpenAPIOptionsParams): Promise<{
|
|
38
38
|
operations: JSONSchemaOperationConfig[];
|
|
39
39
|
endpoint: string;
|
|
40
40
|
cwd: string;
|