File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1515 "linter" : {
1616 "enabled" : true ,
1717 "rules" : {
18- "recommended" : true
18+ "recommended" : true ,
19+ "correctness" : {
20+ "noUnusedVariables" : " warn"
21+ }
1922 }
2023 },
2124 "javascript" : {
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ const configSchema = Type.Object(
3535 * Prevents the updatedAt field from being generated in the input model
3636 */
3737 ignoreUpdatedAtOnInputModel : Type . Boolean ( { default : true } ) ,
38+ /**
39+ * Prevents the foreignId field from being generated in the input model
40+ */
41+ ignoreForeignOnInputModel : Type . Boolean ( { default : true } ) ,
3842 /**
3943 * How the nullable union should be named
4044 */
@@ -63,7 +67,7 @@ const configSchema = Type.Object(
6367 /**
6468 * When enabled, this option ensures that only primitive types are generated as JSON types.
6569 * This ensures compatibility with tooling that only supports the serilization to JSON primitive types.
66- *
70+ *
6771 * This can be false (off), true (will result in formatted string type) or "transformer" which will use Tybepox transformers
6872 * to output native JS Date types but transforms those to strings on processing
6973 *
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ export function stringifyPlain(
8181 return undefined ;
8282
8383 if (
84+ getConfig ( ) . ignoreForeignOnInputModel &&
8485 ( isInputModelCreate || isInputModelUpdate ) &&
8586 ( field . name . toLowerCase ( ) . endsWith ( "id" ) ||
8687 field . name . toLowerCase ( ) . endsWith ( "foreign" ) ||
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ generatorHandler({
3333 try {
3434 await access ( getConfig ( ) . output ) ;
3535 await rm ( getConfig ( ) . output , { recursive : true } ) ;
36- } catch ( error ) { }
36+ } catch ( _error ) { }
3737
3838 await mkdir ( getConfig ( ) . output , { recursive : true } ) ;
3939
You can’t perform that action at this time.
0 commit comments