Skip to content

Commit c0a6561

Browse files
authored
HCK-13242: fix missed entity type (#127)
* add type for entity while RE from instance * add adapter to add missed entity type
1 parent 5d4a3a4 commit c0a6561

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

adapter/0.2.12.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* {
3+
* "add": {
4+
* "entity": [<names of new property>],
5+
* "container": [<names of new property>],
6+
* "model": [<names of new property>],
7+
* "view": [<names of new property>],
8+
* "field": {
9+
* "<type>": [<names of new property>]
10+
* }
11+
* },
12+
* "delete": {
13+
* "entity": [<names of new property>],
14+
* "container": [<names of new property>],
15+
* "model": [<names of new property>],
16+
* "view": [<names of new property>],
17+
* "field": {
18+
* "<type>": [<names of new property>]
19+
* }
20+
* },
21+
* "modify": {
22+
* "entity": [
23+
* {
24+
* "from": { <properties that identify record> },
25+
* "to": { <properties that need to be changed> }
26+
* }
27+
* ],
28+
* "container": [],
29+
* "model": [],
30+
* "view": [],
31+
* "field": []
32+
* },
33+
* }
34+
*
35+
* Set type to object if it is missing in entity definition
36+
*/
37+
{
38+
"add": {},
39+
"modify": {
40+
"entity": [
41+
[
42+
"assignProperties",
43+
{
44+
"key": "type",
45+
"exist": false
46+
},
47+
{
48+
"type": "object"
49+
}
50+
]
51+
]
52+
},
53+
"delete": {}
54+
}

reverse_engineering/mappers/schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function getMappedSchemaFromInstance({ schemaItems, graphName, logger }) {
112112
jsonSchema: {
113113
properties,
114114
required,
115+
type: 'object',
115116
},
116117
},
117118
emptyBucket: false,

0 commit comments

Comments
 (0)