@platformatic/sql-json-schema-mapper 3.53.0-alpha.0 → 3.54.0

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.
Files changed (2) hide show
  1. package/index.js +1 -21
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -58,26 +58,6 @@ export function mapSQLTypeToOpenAPIType (sqlType) {
58
58
  }
59
59
  }
60
60
 
61
- function mapSQLTypeToOpenAPISchema (field) {
62
- if (field.sqlType === 'vector') {
63
- const schema = {
64
- type: 'array',
65
- items: {
66
- type: 'number'
67
- }
68
- }
69
-
70
- if (field.vectorDimensions) {
71
- schema.minItems = field.vectorDimensions
72
- schema.maxItems = field.vectorDimensions
73
- }
74
-
75
- return schema
76
- }
77
-
78
- return { type: mapSQLTypeToOpenAPIType(field.sqlType) }
79
- }
80
-
81
61
  export function mapSQLEntityToJSONSchema (entity, ignore = {}, noRequired = false) {
82
62
  const fields = entity.camelCasedFields
83
63
  const properties = {}
@@ -103,7 +83,7 @@ export function mapSQLEntityToJSONSchema (entity, ignore = {}, noRequired = fals
103
83
  additionalProperties: true
104
84
  }
105
85
  } else {
106
- properties[field.camelcase] = mapSQLTypeToOpenAPISchema(field)
86
+ properties[field.camelcase] = { type }
107
87
  }
108
88
  if (field.isNullable || noRequired || field.autoTimestamp) {
109
89
  properties[field.camelcase].nullable = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/sql-json-schema-mapper",
3
- "version": "3.53.0-alpha.0",
3
+ "version": "3.54.0",
4
4
  "description": "Map SQL entity to JSON schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "neostandard": "^0.12.0",
23
23
  "typescript": "^5.5.4",
24
24
  "why-is-node-running": "^2.2.2",
25
- "@platformatic/sql-mapper": "3.53.0-alpha.0"
25
+ "@platformatic/sql-mapper": "3.54.0"
26
26
  },
27
27
  "dependencies": {
28
28
  "code-block-writer": "^13.0.1",