joi-to-json
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -0,0 +0,0 @@ ## Logical Relation |
@@ -0,0 +0,0 @@ import Joi from 'joi-17'; |
@@ -12,2 +12,3 @@ const cmp = require('semver-compare') | ||
const JoiOpenApiSchemaParser = require('./lib/parsers/open-api') | ||
const JoiOpenApiThreePointOneSchemaParser = require('./lib/parsers/open-api-3.1') | ||
const JoiJsonDraftSchemaParser19 = require('./lib/parsers/json-draft-2019-09') | ||
@@ -23,3 +24,4 @@ const JoiJsonDraftSchemaParser = require('./lib/parsers/json-draft-04') | ||
json: JoiJsonSchemaParser, | ||
'open-api': JoiOpenApiSchemaParser | ||
'open-api': JoiOpenApiSchemaParser, | ||
'open-api-3.1': JoiOpenApiThreePointOneSchemaParser | ||
} | ||
@@ -26,0 +28,0 @@ |
@@ -0,0 +0,0 @@ const _ = require('lodash') |
@@ -0,0 +0,0 @@ const BaseConverter = require('./v15') |
@@ -64,2 +64,5 @@ const _ = require('lodash') | ||
fieldSchema.type = typeof fieldSchema.const | ||
if (fieldSchema.type === 'number' && Number.isInteger(fieldSchema.const)) { | ||
fieldSchema.type = 'integer' | ||
} | ||
} | ||
@@ -66,0 +69,0 @@ fieldSchema.enum = [fieldSchema.const] |
{ | ||
"name": "joi-to-json", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "joi to JSON / OpenAPI Schema Converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -54,2 +54,3 @@ # joi-to-json | ||
* `open-api` - Stands for OpenAPI 3.0 Schema - an extended subset of JSON Schema Specification Wright Draft 00 (aka Draft 5) | ||
* `open-api-3.1` - Stands for OpenAPI 3.1 Schema - a superset of JSON Schema Specification Draft 2020-12 | ||
* `json-draft-04` - Stands for JSON Schema Draft 04 | ||
@@ -56,0 +57,0 @@ * `json-draft-2019-09` - Stands for JSON Schema Draft 2019-09 |
62199
17
1353
335