-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathopenapi-to-rust.toml
More file actions
33 lines (29 loc) · 1.17 KB
/
Copy pathopenapi-to-rust.toml
File metadata and controls
33 lines (29 loc) · 1.17 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
[generator]
spec_path = "../../specs/openai.yaml"
output_dir = "src/gen"
module_name = "openai"
[features]
enable_async_client = true
[client]
# Compile the generated Rust client from the same selected OpenAI operations.
# Wire-level Rust client/server round trips live in the generic roundtrip tests;
# this example is the production-spec compatibility row.
operations = ["createResponse", "listInputItems", "usage-costs"]
prune_models = true
[server]
framework = "axum"
# createResponse — body + SSE path
# listInputItems — path + four optional query params (one is an enum)
# usage-costs — required query param (start_time) + lives on a
# different tag, so it also exercises the multi-tag
# combined `build_router` factory.
operations = ["createResponse", "listInputItems", "usage-costs"]
# Drop schemas not reachable from the picked operations. Cuts the
# 2154-schema OpenAI spec down to just what these three ops touch.
# The generated client selects the same operation set, so the shared pruned
# model closure remains complete for both sides.
prune_models = true
[server.validation]
enabled = true
max_body_bytes = 2097152
max_errors = 16