axe-api 1.4.4 → 1.4.5

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.
@@ -58,7 +58,11 @@ class ModelTreeBuilder {
58
58
  // We should add recursive models
59
59
  this.version.modelList.get().forEach((model) => {
60
60
  const recursiveRelations = model.relations.filter((relation) => relation.model === model.name);
61
- if (recursiveRelations.length === 2) {
61
+ const hasManyCount = recursiveRelations.filter((item) => item.type === Enums_1.Relationships.HAS_MANY).length;
62
+ const hasOneCount = recursiveRelations.filter((item) => item.type === Enums_1.Relationships.HAS_ONE).length;
63
+ if (recursiveRelations.length === 2 &&
64
+ hasManyCount === 1 &&
65
+ hasOneCount === 1) {
62
66
  model.setAsRecursive();
63
67
  tree.push(model);
64
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-api",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "AXE API is a simple tool to create Rest APIs quickly.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -125,7 +125,7 @@
125
125
  "pg": "^8.13.0",
126
126
  "prettier": "^3.3.3",
127
127
  "redis": "^4.7.0",
128
- "robust-validator": "^1.1.1",
128
+ "robust-validator": "^2.0.1",
129
129
  "serve-static": "^1.16.2",
130
130
  "set-value": ">=4.1.0",
131
131
  "sqlite3": "^5.1.7",
package/readme.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  It offers a comprehensive structure for your API, including numerous features and best practices that will save you time.
29
29
 
30
- ## Video Introduction
30
+ ## 🎥 Video Introduction
31
31
 
32
32
  <div style="display: flex; justify-content: center;">
33
33
 
@@ -37,10 +37,18 @@ It offers a comprehensive structure for your API, including numerous features an
37
37
 
38
38
  </div>
39
39
 
40
- ## Documentation
40
+ ## 📚 Documentation
41
41
 
42
42
  Axe API has great documentation. Please [check it out in here](https://axe-api.com/).
43
43
 
44
- ## License
44
+ ## 👥 Contributors
45
+
46
+ <a href="https://github.com/axe-api/axe-api/graphs/contributors">
47
+ <img src="https://contrib.rocks/image?repo=axe-api/axe-api" />
48
+ </a>
49
+
50
+ Made with [contrib.rocks](https://contrib.rocks).
51
+
52
+ ## 📜 License
45
53
 
46
54
  [MIT License](LICENSE)