Skip to content

Commit 0852a56

Browse files
committed
fix(Schemas): print params
1 parent 2f7f42b commit 0852a56

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

generate_schemas.js

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import fs from "fs";
24
import path from "path";
35
import { glob } from "glob";
@@ -115,7 +117,7 @@ function return_json_schema(directoryPath, folder_path, projectName) {
115117
jsonTypes.join("\n");
116118
pythonContent = pythonContent.replace(
117119
/@dataclass\nclass (\w+)(?:\s*\([^)]*\))?\s*:/g,
118-
"@dataclass\nclass $1(DataClassJsonMixin):"
120+
"@dataclass\nclass $1(DataClassJsonMixin):\n def __post_init__(self):\n print(self, flush=True)\n"
119121
);
120122
const pythonFile = path.join(folder.path, filename + ".py");
121123
const initFile = path.join(folder.path, "__init__.py");

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "@geode/opengeodeweb-microservice",
33
"version": "0.0.0",
44
"description": "Shared utilities and schema generator for OpenGeodeWeb ecosystem",
5+
"bin": {
6+
"opengeodeweb-microservice-generate": "./generate_schemas.js"
7+
},
58
"main": "generate_schemas.js",
69
"scripts": {
710
"test": "echo \"Error: no test specified\" && exit 0",

0 commit comments

Comments
 (0)