rad-api 1.0.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rad-api",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "RAD pour créer des routes, controller, model ... etc",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@ export async function generate(type, tableName, pathOverride='output') {
12
12
  const { tableSingular, tablePlural } = formatTableName(tableName);
13
13
 
14
14
  // Récupérer le template
15
- let content = readTemplate('route');
15
+ let content = readTemplate(type);
16
16
 
17
17
  // Remplacer les placeholders
18
18
  content = content.replace(/{{TABLE_SINGULAR}}/g, tableSingular);
@@ -6,9 +6,9 @@ const router = Router();
6
6
 
7
7
  /**
8
8
  * @openapi
9
- * /{TABLE_SINGULAR}/:
9
+ * {{TABLE_SINGULAR}}:
10
10
  * get:
11
- * summary: get all {TABLE_PLURAL}
11
+ * summary: get all {{TABLE_PLURAL}}
12
12
  * responses:
13
13
  * 200:
14
14
  * description: OK