New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@platformatic/sql-json-schema-mapper

Package Overview
Dependencies
Maintainers
6
Versions
331
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/sql-json-schema-mapper - npm Package Compare versions

Comparing version 0.20.0 to 0.20.1

5

index.js

@@ -126,3 +126,4 @@ 'use strict'

for (const name of Object.keys(properties)) {
const { type, nullable, items } = properties[name]
const localProperty = properties[name]
const { type, nullable, items } = localProperty
addedProps.add(name)

@@ -174,2 +175,4 @@ if (required.indexOf(name) !== -1) {

})
} else if (type === 'string' && localProperty.enum) {
writer.write(localProperty.enum.sort().map((v) => `"${v}"`).join(' | '))
} else {

@@ -176,0 +179,0 @@ writer.write(JSONSchemaToTsType(type))

4

package.json
{
"name": "@platformatic/sql-json-schema-mapper",
"version": "0.20.0",
"version": "0.20.1",
"description": "Map SQL entity to JSON schema",

@@ -21,3 +21,3 @@ "main": "index.js",

"tap": "^16.3.4",
"@platformatic/sql-mapper": "0.20.0"
"@platformatic/sql-mapper": "0.20.1"
},

@@ -24,0 +24,0 @@ "dependencies": {

@@ -190,1 +190,23 @@ 'use strict'

})
referenceTest('enums', {
id: 'Page',
title: 'Page',
description: 'A Page',
type: 'object',
properties: {
id: {
type: 'integer'
},
title: {
type: 'string'
},
color: {
type: 'string',
enum: ['amber', 'green', 'red']
}
},
required: [
'title'
]
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc