@kokimoki/kit 1.6.2 → 1.6.4
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/kokimoki-kit-plugin.js +9 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
@@ -160,6 +160,15 @@ function kokimokiKitPlugin(config) {
|
|
160
160
|
}));
|
161
161
|
delete ctx.jsonSchema.anyOf;
|
162
162
|
}
|
163
|
+
// Remove fields that have a default from the required list
|
164
|
+
if (ctx.jsonSchema.properties && ctx.jsonSchema.required) {
|
165
|
+
const properties = ctx.jsonSchema.properties;
|
166
|
+
ctx.jsonSchema.required = ctx.jsonSchema.required.filter((field) => !("default" in properties[field]));
|
167
|
+
}
|
168
|
+
// Make sure property has description if set in zod schema
|
169
|
+
if ("description" in ctx.zodSchema) {
|
170
|
+
ctx.jsonSchema.description = ctx.zodSchema.description;
|
171
|
+
}
|
163
172
|
},
|
164
173
|
});
|
165
174
|
await promises_1.default.writeFile(".kokimoki/schema.json", JSON.stringify(jsonSchema, null, 2));
|
package/dist/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const KOKIMOKI_KIT_VERSION = "1.6.
|
1
|
+
export declare const KOKIMOKI_KIT_VERSION = "1.6.4";
|
package/dist/version.js
CHANGED