|
3 | 3 | ## Code generator limitations |
4 | 4 |
|
5 | 5 | ### oneOf |
6 | | -Some openapi-generator's codegen (Rust) don't like oneOf types with identical type. |
7 | | -It get confused and the produced code don't compile. Typescript Codegen |
8 | | -don't support OneOf at all. the only use of oneOf in osc-api is the |
9 | | -following pattern |
| 6 | +Some openapi-generator codegens (Rust) don't handle oneOf types with identical types well. |
| 7 | +They get confused and the produced code doesn't compile. Typescript codegen |
| 8 | +doesn't support oneOf at all. The only use of oneOf in osc-api is the |
| 9 | +following pattern: |
10 | 10 |
|
11 | 11 | ```yaml |
12 | 12 | oneOf: |
13 | 13 | - type: string |
14 | 14 | format: date |
15 | 15 | - type: string |
16 | | - fromat: date-string |
| 16 | + format: date-string |
17 | 17 | ``` |
18 | | -[Rust OneOf](https://github.com/OpenAPITools/openapi-generator/issues/18527) |
| 18 | +[Rust OneOf](https://github.com/OpenAPITools/openapi-generator/issues/18527) |
19 | 19 | [Rust date-time](https://github.com/OpenAPITools/openapi-generator/issues/19319) |
20 | 20 |
|
21 | 21 | ### date-time |
22 | | -Some openapi-generator's codegen (Go) have herattic implementation of |
23 | | -date-time and date. Go Codegen transpile date-time to time.Time |
24 | | -(both RFC3339, so it's ok), but don't implemente date |
25 | | -(which fallback into string). Rust Codegen transpile everything to string |
| 22 | +Some openapi-generator codegens (Go) have erratic implementations of |
| 23 | +date-time and date. Go codegen transpiles date-time to time.Time |
| 24 | +(both RFC3339, so that's ok), but doesn't implement date |
| 25 | +(which falls back to string). Rust codegen transpiles everything to string. |
26 | 26 |
|
27 | | -With actual patches, everything is baslicly passed at string. |
28 | | -suboptimal but it's part of the prototype |
| 27 | +With current patches, everything is basically passed as string. |
| 28 | +It's suboptimal, but it's part of the prototype. |
29 | 29 |
|
30 | | -### AWS v4 Siguature |
31 | | -Typescript-fetch codegen does not support AWS v4 Siguature. PR prending |
| 30 | +### AWS v4 Signature |
| 31 | +Typescript-fetch codegen does not support AWS v4 Signature. PR pending |
32 | 32 | for typescript-axios. |
33 | 33 |
|
34 | 34 | ## Patch |
35 | | -`patch.rb` is a collections of workarounds for code generators limitations. |
| 35 | +`patch.rb` is a collection of workarounds for code generator limitations. |
36 | 36 |
|
37 | 37 | - nodatetime: remove date-time format from strings |
38 | 38 | - nodate: remove date format from strings |
39 | | - - nooneof: substitube oneOf for the first type defined |
| 39 | + - nooneof: substitute oneOf for the first type defined |
40 | 40 | - noproperties-array: inflate array's items definition |
41 | 41 | - patch: apply strategic merge patch in post-process. Should be last resort |
0 commit comments