mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
REST API OpenAPI spec (#612)
* OpenAPI spec in specs/api. Checked lint with redoc.
This commit is contained in:
parent
62b754d788
commit
fce43ae035
84 changed files with 5638 additions and 0 deletions
67
specs/api/components/schemas/config/ConfigRequest.yaml
Normal file
67
specs/api/components/schemas/config/ConfigRequest.yaml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
type: object
|
||||
description: |
|
||||
Configuration service request.
|
||||
|
||||
Supports operations: config, list, get, put, delete
|
||||
required:
|
||||
- operation
|
||||
properties:
|
||||
operation:
|
||||
type: string
|
||||
enum: [config, list, get, put, delete]
|
||||
description: |
|
||||
Operation to perform:
|
||||
- `config`: Get complete configuration
|
||||
- `list`: List all items of a specific type
|
||||
- `get`: Get specific configuration items
|
||||
- `put`: Set/update configuration values
|
||||
- `delete`: Delete configuration items
|
||||
example: config
|
||||
type:
|
||||
type: string
|
||||
description: |
|
||||
Configuration type (required for list, get, put, delete operations).
|
||||
Common types: flow, prompt, token-cost, parameter-type, interface-description
|
||||
example: flow
|
||||
keys:
|
||||
type: array
|
||||
description: Keys to retrieve (for get operation) or delete (for delete operation)
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- key
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: Configuration type
|
||||
example: flow
|
||||
key:
|
||||
type: string
|
||||
description: Configuration key
|
||||
example: my-flow
|
||||
values:
|
||||
type: array
|
||||
description: Values to set/update (for put operation)
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- key
|
||||
- value
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: Configuration type
|
||||
example: flow
|
||||
key:
|
||||
type: string
|
||||
description: Configuration key
|
||||
example: my-flow
|
||||
value:
|
||||
type: object
|
||||
description: Configuration value (structure depends on type)
|
||||
additionalProperties: true
|
||||
example:
|
||||
blueprint-name: document-rag
|
||||
description: My RAG flow
|
||||
49
specs/api/components/schemas/config/ConfigResponse.yaml
Normal file
49
specs/api/components/schemas/config/ConfigResponse.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
type: object
|
||||
description: Configuration service response
|
||||
properties:
|
||||
version:
|
||||
type: integer
|
||||
description: Configuration version number
|
||||
example: 42
|
||||
config:
|
||||
type: object
|
||||
description: Complete configuration (returned by 'config' operation)
|
||||
additionalProperties: true
|
||||
example:
|
||||
flow:
|
||||
default:
|
||||
blueprint-name: document-rag+graph-rag
|
||||
description: Default flow
|
||||
prompt:
|
||||
system: You are a helpful AI assistant
|
||||
token-cost:
|
||||
gpt-4:
|
||||
prompt: 0.03
|
||||
completion: 0.06
|
||||
directory:
|
||||
type: array
|
||||
description: List of keys (returned by 'list' operation)
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- default
|
||||
- production
|
||||
- my-flow
|
||||
values:
|
||||
type: array
|
||||
description: Retrieved configuration values (returned by 'get' operation)
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
example: flow
|
||||
key:
|
||||
type: string
|
||||
example: default
|
||||
value:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
example:
|
||||
blueprint-name: document-rag+graph-rag
|
||||
description: Default flow
|
||||
Loading…
Add table
Add a link
Reference in a new issue