Initial commit

This commit is contained in:
Gregor Schulte
2026-02-02 08:41:48 +01:00
commit 43b4910a63
30 changed files with 4898 additions and 0 deletions

41
api/README.md Normal file
View File

@@ -0,0 +1,41 @@
# OpenAPI Specification for Prefect Server API
This directory contains the OpenAPI specification for the Prefect v3 Server REST API.
## How to obtain the OpenAPI spec
The OpenAPI specification is available from a running Prefect server instance.
### Option 1: From a local Prefect server
1. Start a Prefect server:
```bash
prefect server start
```
2. Download the OpenAPI specification:
```bash
curl http://localhost:4200/openapi.json -o api/openapi.json
```
### Option 2: From Prefect Cloud
```bash
curl https://api.prefect.cloud/api/openapi.json -o api/openapi.json
```
## Generating Go code
After obtaining the OpenAPI specification, run:
```bash
make generate
```
This will generate Go types and client code from the OpenAPI spec.
## Note
The `openapi.json` file is not included in the repository by default. You need to obtain it from a running Prefect server instance as described above.
For development purposes, a minimal placeholder spec is provided to allow the project to compile without a full Prefect server setup.

30
api/openapi.json Normal file
View File

@@ -0,0 +1,30 @@
{
"openapi": "3.1.0",
"info": {
"title": "Prefect Server API",
"description": "REST API for Prefect Server v3",
"version": "3.0.0"
},
"servers": [
{
"url": "http://localhost:4200/api",
"description": "Local Prefect Server"
}
],
"paths": {
"/health": {
"get": {
"summary": "Health Check",
"operationId": "health_check",
"responses": {
"200": {
"description": "Server is healthy"
}
}
}
}
},
"components": {
"schemas": {}
}
}