mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-17 06:04:23 +01:00
Update API generation docs and just task (#2668)
This commit is contained in:
@@ -67,6 +67,21 @@ you can talk to goose!
|
|||||||
|
|
||||||
You can now make changes in the code in ui/desktop to iterate on the GUI half of goose.
|
You can now make changes in the code in ui/desktop to iterate on the GUI half of goose.
|
||||||
|
|
||||||
|
### Regenerating the OpenAPI schema
|
||||||
|
|
||||||
|
The file `ui/desktop/openapi.json` is automatically generated during the build.
|
||||||
|
It is written by the `generate_schema` binary in `crates/goose-server`.
|
||||||
|
If you need to update the spec without starting the UI, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
just generate-openapi
|
||||||
|
```
|
||||||
|
|
||||||
|
This command regenerates `ui/desktop/openapi.json` and then runs the UI's
|
||||||
|
`generate-api` script to rebuild the TypeScript client from that spec.
|
||||||
|
|
||||||
|
Changes to the API should be made in the Rust source under `crates/goose-server/src/`.
|
||||||
|
|
||||||
## Creating a fork
|
## Creating a fork
|
||||||
|
|
||||||
To fork the repository:
|
To fork the repository:
|
||||||
|
|||||||
7
Justfile
7
Justfile
@@ -177,6 +177,13 @@ run-server:
|
|||||||
@echo "Running server..."
|
@echo "Running server..."
|
||||||
cargo run -p goose-server
|
cargo run -p goose-server
|
||||||
|
|
||||||
|
# Generate OpenAPI specification without starting the UI
|
||||||
|
generate-openapi:
|
||||||
|
@echo "Generating OpenAPI schema..."
|
||||||
|
cargo run -p goose-server --bin generate_schema
|
||||||
|
@echo "Generating frontend API..."
|
||||||
|
cd ui/desktop && npm run generate-api
|
||||||
|
|
||||||
# make GUI with latest binary
|
# make GUI with latest binary
|
||||||
lint-ui:
|
lint-ui:
|
||||||
cd ui/desktop && npm run lint:check
|
cd ui/desktop && npm run lint:check
|
||||||
|
|||||||
Reference in New Issue
Block a user