@platformatic/sql-json-schema-mapper 0.32.0 → 0.33.1

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.
package/index.js CHANGED
@@ -112,7 +112,7 @@ function mapSQLEntityToJSONSchema (entity, ignore = {}, noRequired = false) {
112
112
  }
113
113
 
114
114
  if (required.length > 0) {
115
- res.required = required
115
+ res.required = required.sort()
116
116
  }
117
117
 
118
118
  return res
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/sql-json-schema-mapper",
3
- "version": "0.32.0",
3
+ "version": "0.33.1",
4
4
  "description": "Map SQL entity to JSON schema",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "snazzy": "^9.0.0",
19
19
  "standard": "^17.1.0",
20
20
  "tap": "^16.3.6",
21
- "@platformatic/sql-mapper": "0.32.0"
21
+ "@platformatic/sql-mapper": "0.33.1"
22
22
  },
23
23
  "dependencies": {
24
24
  "code-block-writer": "^12.0.0",
@@ -253,6 +253,6 @@ test('PG Arrays', { skip: !isPg }, async (t) => {
253
253
  t.same(pageJsonSchema.properties.id, { type: 'integer' })
254
254
  t.same(pageJsonSchema.properties.title, { type: 'string' })
255
255
  t.same(pageJsonSchema.properties.tags, { type: 'array', items: { type: 'string' } })
256
- t.same(pageJsonSchema.required, ['title', 'tags'])
256
+ t.same(pageJsonSchema.required, ['tags', 'title'])
257
257
  }
258
258
  })