Skip to content

Commit

Permalink
import float as unknown from openapi spec (#3144)
Browse files Browse the repository at this point in the history
* handle float as unknown

* parse to number

* float
  • Loading branch information
buie authored Mar 11, 2024
1 parent e335b3f commit e6274ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/cli/openapi-parser/src/schema/convertSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,17 @@ export function convertSchemaObject(
groupName
});
}
if (schema === "float") {
return convertNumber({
nameOverride,
generatedName,
format: "float",
description,
wrapAsNullable,
example: getExampleAsNumber(schema),
groupName
});
}
if (schema === "string" || schema.type === "string") {
if (schema.format === "date-time") {
return wrapPrimitive({
Expand Down

0 comments on commit e6274ab

Please sign in to comment.