forked from aws-samples/agent-preparation-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-schema.yaml
More file actions
81 lines (81 loc) · 2.44 KB
/
api-schema.yaml
File metadata and controls
81 lines (81 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
openapi: 3.0.0
info:
title: 'HR Agent'
version: 1.0.0
description: "APIs for HR"
paths:
/select:
get:
summary: 'hr select'
description: "Execute SQL query on employee database. This endpoint allows querying employee information including ID, name, and hire date. The database contains a single table 'employees' with columns (id, name, hire_date)."
operationId: "select"
x-requireConfirmation: "DISABLED"
parameters:
- name: sql
in: query
description: 'SQL Select query to execute'
required: true
schema:
type: string
pattern: '^SELECT\s+.*$'
example: "SELECT name, hire_date FROM employees WHERE id = 1"
responses:
'200':
description: "Query executed successfully"
content:
application/json:
schema:
type: array
items:
type: object
additionalProperties:
type: string
description: "Array of objects containing employee records with column names as keys"
example: [
{
"id": "1",
"name": "Kazuhito Go",
"hire_date": "2020-01-01"
}
]
'400':
description: "Bad Request"
content:
application/json:
schema:
type: object
properties:
error:
type: string
example:
error: "SQLクエリが指定されていません。"
'403':
description: "Forbidden"
content:
application/json:
schema:
type: object
properties:
error:
type: string
example:
error: "不正なSQLクエリが検出されました。"
'500':
description: "Internal Server Error"
content:
application/json:
schema:
type: object
properties:
error:
type: string
example:
error: "データベース接続エラー"
security:
- api_key: []
components:
securitySchemes:
api_key:
type: apiKey
name: x-api-key
in: header