[Typescript] Enum types#18531
[Typescript] Enum types#18531macjohnny merged 8 commits intoOpenAPITools:8.0.xfrom ksvirkou-hubspot:feature/enumType
Conversation
bodograumann
left a comment
There was a problem hiding this comment.
Nice work.
I would have given a bit more details in the help:
|enumType|Specify the enum type which should be used in the client code.|<dl><dt>**stringUnion**</dt><dd>Union of literal string types</dd><dt>**enum**</dt><dd>Typescript's [string enums](https://www.typescriptlang.org/docs/handbook/enums.html#string-enums)</dd></dl>|stringUnion|But I realized, that doing this in the java-generated cli help as well would be more difficult, so I think it's fine as-is.
Done |
|
@bodograumann |
|
Sorry, I don't have any elevated access here 😉 @ksvirkou-hubspot. Maybe @TiFu or @wing328 can. |
docs/generators/typescript.md
Outdated
| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| | ||
| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| | ||
| |enumPropertyNamingReplaceSpecialChar|Set to true to replace '-' and '+' symbols with 'minus_' and 'plus_' in enum of type string| |false| | ||
| |enumType|Specify the enum type which should be used in the client code.|<dl><dt>**stringUnion**</dt><dd>Union of literal string types</dd><dt>**enum**</dt><dd>Typescript's [string enums](https://www.typescriptlang.org/docs/handbook/enums.html#string-enums)</dd></dl>|stringUnion| |
There was a problem hiding this comment.
please default to enum for backwards compatibility
There was a problem hiding this comment.
The rational here was that a breaking change was (kind of accidentally) introduced in #14663.
So this pr fixes that.
Personally I would be ok with either solution.
There was a problem hiding this comment.
ah i see. well i guess i would still lean towards making enum the default, since 7.0.0 was released a while ago
There was a problem hiding this comment.
I've done it
Could you check it, please?
|
import { createConfig, http } from "wagmi"; export const config = createConfig({ |
|
Unfortunately this was only merged into the 8.0.x branch, @wing328 . |
openapi-generator 8에 들어가게되는 OpenAPITools#18531 를 채리픽 합니다.
openapi-generator 8에 들어가게되는 OpenAPITools#18531 를 채리픽 합니다.
openapi-generator 8에 들어가게되는 OpenAPITools#18531 를 채리픽 합니다.
openapi-generator 8에 들어가게되는 OpenAPITools#18531 를 채리픽 합니다.
* feat(openapi): bfc784e openapi-generator 8에 들어가게되는 OpenAPITools#18531 를 채리픽 합니다. * fix(typescript-client): TypeScript Client 의 codegen 이 'from' 을 예약어 취급해서 제네래이션을 막는 버그 수정 * chore: example update * chore: docsgen 누락 수정 * fix: 기본값수정 * chore: test 누락 수정 * fix: whatwg-fetch 의존성 제거 full-context: 현제 니즈에서는 whatwg-fetch 만을 포함할수 있는 상황도 아니며 재품 기준에서 처리하기 어려움 * fix(openapi-typescript): auth methods configuration 타입젠이 잘못된 securitySchemes 를 만나면 타입의 값이 비어버리는 버그 픽스 * chore: update diff
#14569
Added
enumTypegenerator argument:stringUnion-"available" | "pending" | "sold"enum-{ Available = 'available', Pending = 'pending', Sold = 'sold' }PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)