Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .generation/Dockerfile

This file was deleted.

33 changes: 21 additions & 12 deletions .generation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,52 @@

Auto-generated Python Client API for Geo Engine

# Dependencies
## Dependencies

- Python
- Podman
- Java Runtime

# Generation
## Generation

From the root of the repository run:

```bash
.generation/generate.py python
just build
```

For specific languages, run:

```bash
just build-python
just build-typescript
```

## Dev-Mode

To fetch the OpenAPI spec from the backend, run:

```bash
wget -O .generation/input/openapi.json \
https://raw.githubusercontent.com/geo-engine/geoengine/refs/heads/main/openapi.json
just fetch-openapi-spec --backendCommit=1076a616369dcc33e86b422a9364ac99553a18f8
```

To run the generation in dev mode, run:
You can verify the OpenAPI spec with:

```bash
.generation/generate.py --no-spec-fetch --no-container-build python
just lint-openapi-spec
```

This will skip the running of the container and instead use the local files.
It will also stop building the customized generator container.

## Update config.ini

To update the config.ini file, run:

```bash
.generation/update_config.py --backendCommit 1076a616369dcc33e86b422a9364ac99553a18f8
just update-config --backendCommit=1076a616369dcc33e86b422a9364ac99553a18f8
```

This will set a new backend commit hash and increment the version number.

Note, that you still need to build the clients after updating the config.ini file, otherwise the generated code will not be updated. You can do this with:

```bash
just build
```
10 changes: 7 additions & 3 deletions .generation/config.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[input]
backendCommit = 078c127068af03af5f55aef8859f930574bf7797
backendCommit = 6d70b3157a7ab5f8d53037260f9b918ee47d9bf2

[general]
githubUrl = https://github.com/geo-engine/openapi-client
version = 0.0.31
version = 0.0.32

[git]
host = github.com
user = geo-engine
repo = openapi-client

[python]
name = geoengine_openapi_client
Expand Down
13 changes: 13 additions & 0 deletions .generation/config/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
inputSpec: .generation/input/openapi.json
outputDir: python
generatorName: python
gitHost: github.com
gitUserId: geo-engine
gitRepoId: openapi-client
additionalProperties:
useOneOfDiscriminatorLookup: true
packageName: "geoengine_openapi_client"
packageVersion: 0.0.32
packageUrl: "https://github.com/geo-engine/openapi-client"
openapiNormalizer:
REF_AS_PARENT_IN_ALLOF: true
12 changes: 12 additions & 0 deletions .generation/config/typescript.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
inputSpec: .generation/input/openapi.json
outputDir: typescript
generatorName: typescript-fetch
gitHost: github.com
gitUserId: geo-engine
gitRepoId: openapi-client
additionalProperties:
supportsES6: true
npmName: "@geoengine/openapi-client"
npmVersion: 0.0.32
openapiNormalizer:
REF_AS_PARENT_IN_ALLOF: true
265 changes: 0 additions & 265 deletions .generation/generate.py

This file was deleted.

2 changes: 0 additions & 2 deletions .generation/override.env

This file was deleted.

Loading
Loading