Skip to content

Commit b4d83dd

Browse files
feat: add NDVI process endpoint and OpenAPI documentation
- Implemented the NDVI process execution endpoint in `path_info.rs`. - Added OpenAPI specifications for the NDVI process inputs and outputs. - Created a `justfile` for managing API client generation and backend tasks. - Generated initial OpenAPI specification and saved it to `openapi.json`.
1 parent 0219f8f commit b4d83dd

File tree

99 files changed

+10018
-406
lines changed

Some content is hidden

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

99 files changed

+10018
-406
lines changed

.github/copilot-instructions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copilot Instructions
2+
3+
This BioIS monorepo is written in Rust, SQL, TypeScript and Python.
4+
5+
## Repository Structure
6+
7+
| Path | Description |
8+
| ----------------- | -------------------------------------------------|
9+
| `README.md` | Project Documentation |
10+
| `LICENSE` | License File |
11+
| `.github/` | GitHub Configuration |
12+
| `justfile` | Justfile for task automation |
13+
| `backend/` | Rust API Code |
14+
| `frontend/` | TypeScript Angular Frontend Code |
15+
| `api-client/` | OpenAPI client code generated from the API spec |
16+
| `test-client/` | Snippet-based test client for testing the API |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
applyTo: "api-client/**/*"
3+
---
4+
5+
# Copilot Instructions
6+
7+
- Never modify the `typescript` directory manually.
8+
It is generated from the OpenAPI specification in `openapi.json` using the OpenAPI Generator.
9+
To regenerate the API client, run `just generate-api-client` from the project root.
10+
- The OpenAPI Generator configuration is defined in `config.yaml`.
11+
If you need to change the generated code, modify the configuration and regenerate the client.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
applyTo: "backend/**/*.rs, backend/**/*.sql"
3+
---
4+
5+
# Copilot Instructions
6+
7+
## Coding Style
8+
9+
### Rust
10+
11+
- Follow the Rust API guidelines for naming conventions, error handling, and documentation.
12+
- Use `snake_case` for variable and function names, and `PascalCase` for struct and enum names.
13+
- Ensure that all public functions and types have documentation comments using `///`.
14+
- Use `Result<T>` (from anyhow) for error handling and define custom error types where appropriate.
15+
- Use `camelCase` for JSON field names when serializing/deserializing with serde, and use `#[serde(rename_all = "camelCase")]` on structs to enforce this convention.
16+
- Never use `unwrap()` or `expect()` in production code. Instead, propagate errors using the `?` operator or handle them gracefully.
17+
- Start test function names with `it_` and use descriptive names that indicate what the test is verifying.
18+
19+
### SQL
20+
21+
- The SQL dialect used in this project is PostgreSQL. Follow the PostgreSQL SQL style guide for formatting and conventions.
22+
- For SQL queries, use uppercase for SQL keywords (e.g., SELECT, FROM, WHERE) and lowercase for table and column names.
23+
- SQLFluff is used for linting SQL files. Ensure that your SQL code adheres to the configured SQLFluff rules.

api-client/config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
inputSpec: /local/openapi.json
2+
outputDir: /local/typescript
3+
generatorName: typescript
4+
gitHost: github.com
5+
gitUserId: geo-engine
6+
gitRepoId: BioIS
7+
additionalProperties:
8+
supportsES6: true
9+
npmName: "@geoengine/biois"
10+
npmVersion: 0.1.0
11+
openapiNormalizer:
12+
REF_AS_PARENT_IN_ALLOF: true

api-client/openapi.json

Whitespace-only changes.

api-client/typescript/.gitattributes

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

api-client/typescript/.gitignore

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)