Commit 87ffcd1
fix(openapi): remove schema-level examples from error schemas to fix codegen
datamodel-codegen interprets schema-level `example` values as type constraints,
creating numbered classes (Error1, Error2, Type1, etc.) instead of reusing the
shared ErrorDetail type. Remove examples from error schemas so all error
responses use ErrorDetail directly, producing clean class names.
Also add title: ErrorDetail to the inline error object in ErrorResponse.yaml
so datamodel-codegen generates a named class instead of a numbered one.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 07e5812 commit 87ffcd1
5 files changed
Lines changed: 1 addition & 60 deletions
File tree
- apify-api/openapi/components/schemas/common
- errors
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Lines changed: 0 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 12 | | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 18 | | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 24 | | |
41 | 25 | | |
42 | 26 | | |
43 | 27 | | |
44 | 28 | | |
45 | 29 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 30 | | |
51 | 31 | | |
52 | 32 | | |
53 | 33 | | |
54 | 34 | | |
55 | 35 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 36 | | |
61 | 37 | | |
62 | 38 | | |
63 | 39 | | |
64 | 40 | | |
65 | 41 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
Lines changed: 0 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 12 | | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 18 | | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 24 | | |
41 | 25 | | |
42 | 26 | | |
43 | 27 | | |
44 | 28 | | |
45 | 29 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 30 | | |
51 | 31 | | |
52 | 32 | | |
53 | 33 | | |
54 | 34 | | |
55 | 35 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
0 commit comments