OpenAPI 3.2 adds a deviceAuthorization entry to the OAuth2 Security Scheme Flows Object, with a deviceAuthorizationUrl field per RFC 8628. This flow is commonly used for CLI tools, smart TVs, and other input-constrained devices.
Current state
OperationTypeCoder in src/typescript-generator/operation-type-coder.ts checks for type === "http" && scheme === "basic" to determine the user type on the $ argument. Other flows, including deviceAuthorization, are not specially handled.
Proposed changes
- Recognise the
deviceAuthorization flow in OperationTypeCoder
- Generate the correct credential shape (device-flow tokens) on the
$ argument for operations secured by the device authorisation flow
Acceptance criteria
OpenAPI 3.2 adds a
deviceAuthorizationentry to the OAuth2 Security Scheme Flows Object, with adeviceAuthorizationUrlfield per RFC 8628. This flow is commonly used for CLI tools, smart TVs, and other input-constrained devices.Current state
OperationTypeCoderinsrc/typescript-generator/operation-type-coder.tschecks fortype === "http" && scheme === "basic"to determine theusertype on the$argument. Other flows, includingdeviceAuthorization, are not specially handled.Proposed changes
deviceAuthorizationflow inOperationTypeCoder$argument for operations secured by the device authorisation flowAcceptance criteria
deviceAuthorizationflow generates a$argument with the correct device-flow credential typetsc --noEmitwithout errors