[API] remove api to generate zod models index to prevent coding errors
This commit is contained in:
parent
17fdd7b83b
commit
1fbc9e5874
@ -1,7 +1,5 @@
|
||||
package org.kar.archidata.dataAccess;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
@ -470,21 +468,4 @@ public class DataFactoryZod {
|
||||
return generatedData.toString();
|
||||
}
|
||||
|
||||
public static void generatePackage(final List<Class<?>> classs, final String pathPackage) throws Exception {
|
||||
final String packageApi = createTables(classs);
|
||||
FileWriter myWriter = new FileWriter(pathPackage + File.separator + "model.ts");
|
||||
myWriter.write(packageApi.toString());
|
||||
myWriter.close();
|
||||
final String index = """
|
||||
/**
|
||||
* Global import of the package
|
||||
*/
|
||||
export * from "./model";
|
||||
|
||||
""";
|
||||
myWriter = new FileWriter(pathPackage + File.separator + "index.ts");
|
||||
myWriter.write(index);
|
||||
myWriter.close();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user