Closed DavidFaizulaev closed 5 years ago
Are you sure it's a valid type for OpenAPI? See https://swagger.io/docs/specification/data-models/data-types/
float does appear there, right next to 'double'.
Can you share fragment of your spec file that is causing the problem?
@DFaiz Ping? Could you please share part of your specification that results in error?
This is a duplicate of #70
When using 'float' format in Swagger schema, the package fails to parse the Swagger file.
Generating the following error:
Encountered an error during start up: Error: unknown format \"float\" is used in schema at path \"#/properties/properties/currency_conversion/properties/fx_quote/properties/fx_rate\"\n at Object.generate_format [as code] (/home/app/node_modules/ajv/lib/dotjs/format.js:69:15)\n at Object.generate_validate [as validate] (/home/app/node_modules/ajv/lib/dotjs/validate.js:347:35)\n at Object.generate_properties [as code] (/home/app/node_modules/ajv/lib/dotjs/properties.js:204:26)\n at Object.generate_validate [as validate] (/home/app/node_modules/ajv/lib/dotjs/validate.js:347:35)\n at Object.generate_properties [as code] (/home/app/node_modules/ajv/lib/dotjs/properties.js:204:26)\n at Object.generate_validate [as validate] (/home/app/node_modules/ajv/lib/dotjs/validate.js:347:35)\n at Object.generate_properties [as code] (/home/app/node_modules/ajv/lib/dotjs/properties.js:204:26)\n at Object.generate_validate [as validate] (/home/app/node_modules/ajv/lib/dotjs/validate.js:347:35)\n at Object.generate_properties [as code] (/home/app/node_modules/ajv/lib/dotjs/properties.js:204:26)\n at generate_validate (/home/app/node_modules/ajv/lib/dotjs/validate.js:347:35)\n at localCompile (/home/app/node_modules/ajv/lib/compile/index.js:87:22)\n at Ajv.compile (/home/app/node_modules/ajv/lib/compile/index.js:56:13)\n at Ajv._compile (/home/app/node_modules/ajv/lib/ajv.js:358:27)\n at Ajv.compile (/home/app/node_modules/ajv/lib/ajv.js:118:37)\n at buildBodyValidation (/home/app/node_modules/express-ajv-swagger-validation/src/middleware.js:187:51)\n at /home/app/node_modules/express-ajv-swagger-validation/src/middleware.js:44:67\n at Array.forEach (<anonymous>)\n at /home/app/node_modules/express-ajv-swagger-validation/src/middleware.js:35:18\n at Array.forEach (<anonymous>)\n at /home/app/node_modules/express-ajv-swagger-validation/src/middleware.js:30:41\n at <anonymous>"