Skip to content

Commit bd5d61d

Browse files
Merge pull request #5 from geo-engine/ui
feat: UI
2 parents e730440 + db71361 commit bd5d61d

File tree

78 files changed

+3556
-557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3556
-557
lines changed

api-client/post-process.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,22 @@
1616

1717

1818
def file_modifications() -> Generator[tuple[Path, FileModifier], None, None]:
19+
"""Return a generator of file paths and their corresponding modification functions."""
20+
1921
yield Path("types/ObjectParamAPI.ts"), object_param_api_ts
2022
yield Path("types/PromiseAPI.ts"), promise_api_ts
23+
yield Path("models/ObjectSerializer.ts"), object_serializer_ts
24+
yield Path("models/Results.ts"), results_ts
2125

2226

2327
def main():
28+
"""Main function to perform file modifications."""
29+
2430
logging.basicConfig(level=logging.INFO, format="[%(levelname)s] %(message)s")
2531

2632
subdir = Path("typescript")
2733
for file_path, modify_fn in file_modifications():
28-
logging.info(f"Modifying {file_path}…")
34+
logging.info("Modifying %s…", file_path)
2935

3036
file_path = subdir / file_path
3137

@@ -36,8 +42,8 @@ def main():
3642
with open(file_path, "w", encoding="utf-8") as f:
3743
for line in modify_fn(file_contents):
3844
f.write(line)
39-
except Exception as e:
40-
logging.error(f"Error modifying {file_path}: {e}")
45+
except Exception as e: # pylint: disable=broad-exception-caught
46+
logging.error("Error modifying %s: %s", file_path, e)
4147

4248

4349
def object_param_api_ts(file_contents: list[str]) -> Generator[str, None, None]:
@@ -56,5 +62,21 @@ def promise_api_ts(file_contents: list[str]) -> Generator[str, None, None]:
5662
yield line
5763

5864

65+
def results_ts(file_contents: list[str]) -> Generator[str, None, None]:
66+
"""Modify the Results.ts file."""
67+
for line in file_contents:
68+
if dedent(line).startswith("import { HttpFile } from '../http/http';"):
69+
line = line + "import { InlineOrRefData } from './InlineOrRefData';\n"
70+
yield line
71+
72+
73+
def object_serializer_ts(file_contents: list[str]) -> Generator[str, None, None]:
74+
"""Modify the ObjectSerializer.ts file."""
75+
for line in file_contents:
76+
if dedent(line).startswith('"Results": ResultsClass,'):
77+
line = "" # lead to call of missing `getAttributeTypeMap` method
78+
yield line
79+
80+
5981
if __name__ == "__main__":
6082
main()

api-client/typescript/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-client/typescript/apis/ProcessesApi.ts

Lines changed: 37 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-client/typescript/apis/UserApi.ts

Lines changed: 85 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)