typed-openapi 2.2.2 → 2.2.3
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.
|
@@ -132,7 +132,7 @@ var openApiSchemaToTs = ({ schema, meta: _inheritedMeta, ctx }) => {
|
|
|
132
132
|
}
|
|
133
133
|
if (schemaType === "object" || schema.properties || schema.additionalProperties) {
|
|
134
134
|
if (!schema.properties) {
|
|
135
|
-
if (schema.additionalProperties && !isReferenceObject(schema.additionalProperties) && typeof schema.additionalProperties !== "boolean"
|
|
135
|
+
if (schema.additionalProperties && !isReferenceObject(schema.additionalProperties) && typeof schema.additionalProperties !== "boolean") {
|
|
136
136
|
const valueSchema = openApiSchemaToTs({ schema: schema.additionalProperties, ctx, meta });
|
|
137
137
|
return t.literal(`Record<string, ${valueSchema.value}>`);
|
|
138
138
|
}
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/dist/node.export.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typed-openapi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/node": "^22.15.17",
|
|
35
35
|
"@types/prettier": "3.0.0",
|
|
36
36
|
"msw": "2.10.5",
|
|
37
|
-
"tstyche": "
|
|
37
|
+
"tstyche": "5.0.0",
|
|
38
38
|
"tsup": "^8.4.0",
|
|
39
39
|
"typescript": "^5.8.3",
|
|
40
40
|
"vitest": "^3.1.3",
|
|
@@ -126,8 +126,7 @@ export const openApiSchemaToTs = ({ schema, meta: _inheritedMeta, ctx }: Openapi
|
|
|
126
126
|
if (
|
|
127
127
|
schema.additionalProperties &&
|
|
128
128
|
!isReferenceObject(schema.additionalProperties) &&
|
|
129
|
-
typeof schema.additionalProperties !== "boolean"
|
|
130
|
-
schema.additionalProperties.type
|
|
129
|
+
typeof schema.additionalProperties !== "boolean"
|
|
131
130
|
) {
|
|
132
131
|
const valueSchema = openApiSchemaToTs({ schema: schema.additionalProperties, ctx, meta });
|
|
133
132
|
return t.literal(`Record<string, ${valueSchema.value}>`);
|