openapi-sync 2.1.7 → 2.1.9
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 +7 -2
- package/db.json +1 -1
- package/dist/Openapi-sync/index.js +1 -0
- package/dist/helpers.js +17 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -740,6 +740,7 @@ ${(0, curl_generator_1.CurlGenerator)({
|
|
|
740
740
|
method: `"${method}"`,
|
|
741
741
|
operationId: `"${eSpec === null || eSpec === void 0 ? void 0 : eSpec.operationId}"`,
|
|
742
742
|
url: endpointUrl,
|
|
743
|
+
tags: (eSpec === null || eSpec === void 0 ? void 0 : eSpec.tags) || [],
|
|
743
744
|
};
|
|
744
745
|
// Add the endpoint url
|
|
745
746
|
endpointsFileContent += `${doc}export const ${endpointPrefix}${name} = ${((_u = (_t = config === null || config === void 0 ? void 0 : config.endpoints) === null || _t === void 0 ? void 0 : _t.value) === null || _u === void 0 ? void 0 : _u.type) === "object"
|
package/dist/helpers.js
CHANGED
|
@@ -107,7 +107,23 @@ const JSONStringify = (obj, indent = 1) => {
|
|
|
107
107
|
const key = keys[i];
|
|
108
108
|
const value = obj[key];
|
|
109
109
|
result += "\n" + " ".repeat(indent) + key + ": ";
|
|
110
|
-
if (
|
|
110
|
+
if (Array.isArray(value)) {
|
|
111
|
+
result += "[";
|
|
112
|
+
for (let j = 0; j < value.length; j++) {
|
|
113
|
+
const item = value[j];
|
|
114
|
+
if (typeof item === "object" && item !== null) {
|
|
115
|
+
result += (0, exports.JSONStringify)(item, indent + 1);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
result += typeof item === "string" ? `"${item}"` : item;
|
|
119
|
+
}
|
|
120
|
+
if (j < value.length - 1) {
|
|
121
|
+
result += ", ";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
result += "]";
|
|
125
|
+
}
|
|
126
|
+
else if (typeof value === "object" && value !== null) {
|
|
111
127
|
result += "" + (0, exports.JSONStringify)(value, indent + 1);
|
|
112
128
|
}
|
|
113
129
|
else {
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ const Init = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
48
48
|
catch (registerError) {
|
|
49
49
|
throw registerError;
|
|
50
50
|
}
|
|
51
|
-
const jsConfigPath = path_1.default.join(rootUsingCwd, "openapi.sync.");
|
|
51
|
+
const jsConfigPath = path_1.default.join(rootUsingCwd, "openapi.sync.js");
|
|
52
52
|
const tsConfigPath = path_1.default.join(rootUsingCwd, "openapi.sync.ts");
|
|
53
53
|
const jsonConfigPath = path_1.default.join(rootUsingCwd, "openapi.sync.json");
|
|
54
54
|
const configPaths = [jsConfigPath, tsConfigPath, jsonConfigPath];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-sync",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "A developer-friendly tool designed to keep your API up-to-date by leveraging OpenAPI schemas. It automates the generation of endpoint URIs and type definitions, including shared types, directly from your OpenAPI specification.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|