json-machete 0.7.5 → 0.7.7
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/index.js +7 -1
- package/index.mjs +7 -1
- package/package.json +7 -2
package/index.js
CHANGED
|
@@ -585,6 +585,12 @@ async function healJSONSchema(schema) {
|
|
|
585
585
|
if (subSchema.items) {
|
|
586
586
|
subSchema.type = 'array';
|
|
587
587
|
}
|
|
588
|
+
if (subSchema.format === 'int64') {
|
|
589
|
+
subSchema.type = 'integer';
|
|
590
|
+
}
|
|
591
|
+
if (subSchema.format) {
|
|
592
|
+
subSchema.type = 'string';
|
|
593
|
+
}
|
|
588
594
|
}
|
|
589
595
|
if (subSchema.type === 'string' && !subSchema.format && (subSchema.examples || subSchema.example)) {
|
|
590
596
|
const examples = asArray(subSchema.examples || subSchema.example || []);
|
|
@@ -598,7 +604,7 @@ async function healJSONSchema(schema) {
|
|
|
598
604
|
if (subSchema.format === 'dateTime') {
|
|
599
605
|
subSchema.format = 'date-time';
|
|
600
606
|
}
|
|
601
|
-
if (subSchema.format) {
|
|
607
|
+
if (subSchema.type === 'string' && subSchema.format) {
|
|
602
608
|
if (!JSONSchemaStringFormats.includes(subSchema.format)) {
|
|
603
609
|
delete subSchema.format;
|
|
604
610
|
}
|
package/index.mjs
CHANGED
|
@@ -580,6 +580,12 @@ async function healJSONSchema(schema) {
|
|
|
580
580
|
if (subSchema.items) {
|
|
581
581
|
subSchema.type = 'array';
|
|
582
582
|
}
|
|
583
|
+
if (subSchema.format === 'int64') {
|
|
584
|
+
subSchema.type = 'integer';
|
|
585
|
+
}
|
|
586
|
+
if (subSchema.format) {
|
|
587
|
+
subSchema.type = 'string';
|
|
588
|
+
}
|
|
583
589
|
}
|
|
584
590
|
if (subSchema.type === 'string' && !subSchema.format && (subSchema.examples || subSchema.example)) {
|
|
585
591
|
const examples = asArray(subSchema.examples || subSchema.example || []);
|
|
@@ -593,7 +599,7 @@ async function healJSONSchema(schema) {
|
|
|
593
599
|
if (subSchema.format === 'dateTime') {
|
|
594
600
|
subSchema.format = 'date-time';
|
|
595
601
|
}
|
|
596
|
-
if (subSchema.format) {
|
|
602
|
+
if (subSchema.type === 'string' && subSchema.format) {
|
|
597
603
|
if (!JSONSchemaStringFormats.includes(subSchema.format)) {
|
|
598
604
|
delete subSchema.format;
|
|
599
605
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-machete",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@graphql-mesh/cross-helpers": "0.1.0",
|
|
7
|
-
"@graphql-mesh/utils": "0.33.
|
|
7
|
+
"@graphql-mesh/utils": "0.33.2",
|
|
8
8
|
"@graphql-tools/utils": "8.6.5",
|
|
9
9
|
"@json-schema-tools/meta-schema": "1.6.19",
|
|
10
10
|
"cross-undici-fetch": "0.1.28",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"tslib": "^2.3.1",
|
|
14
14
|
"url-join": "4.0.1"
|
|
15
15
|
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "Urigo/graphql-mesh",
|
|
19
|
+
"directory": "packages/json-machete"
|
|
20
|
+
},
|
|
16
21
|
"license": "MIT",
|
|
17
22
|
"main": "index.js",
|
|
18
23
|
"module": "index.mjs",
|