|
| 1 | +--- |
| 2 | +'@hey-api/openapi-ts': minor |
| 3 | +--- |
| 4 | + |
| 5 | +feat(config): add `parser` options |
| 6 | + |
| 7 | +### Added `parser` options |
| 8 | + |
| 9 | +Previously, `@hey-api/typescript` would generate correct types, but the validator plugins would have to re-implement the same logic or generate schemas that didn't match the generated types. |
| 10 | + |
| 11 | +Since neither option was ideal, this release adds a dedicated place for `parser` options. Parser is responsible for preparing the input so plugins can generate more accurate output with less effort. |
| 12 | + |
| 13 | +You can learn more about configuring parser on the [Parser](https://heyapi.dev/openapi-ts/configuration/parser) page. |
| 14 | + |
| 15 | +### Moved `input` options |
| 16 | + |
| 17 | +The following options were moved to the new `parser` group. |
| 18 | + |
| 19 | +- `input.filters` moved to `parser.filters` |
| 20 | +- `input.pagination` moved to `parser.pagination` |
| 21 | +- `input.patch` moved to `parser.patch` |
| 22 | +- `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL` |
| 23 | + |
| 24 | +### Updated `typescript` options |
| 25 | + |
| 26 | +The following options were renamed. |
| 27 | + |
| 28 | +- `enumsCase` moved to `enums.case` |
| 29 | +- `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull` |
| 30 | + |
| 31 | +### Moved `typescript` options |
| 32 | + |
| 33 | +The following options were moved to the new `parser` group. |
| 34 | + |
| 35 | +- `exportInlineEnums` moved to `parser.transforms.enums` |
| 36 | +- `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled` |
| 37 | +- `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name` |
| 38 | +- `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name` |
| 39 | + |
| 40 | +### Updated `readWrite.responses` name |
| 41 | + |
| 42 | +Additionally, the naming pattern for response schemas has changed from `{name}Readable` to `{name}`. This is to prevent your code from breaking by default when using a schema that gets updated with a write-only field. |
0 commit comments