-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Hi!
When combining /GenerateClientInterfaces:true
and /UseAbortSignal:true
the interface does not not contain the AbortSignal.
Example output snippet:
export interface IApiStatusClient {
getApiStatusIsOnline(): Promise<void>;
}
export class ApiStatusClient implements IApiStatusClient {
...
getApiStatusIsOnline(signal?: AbortSignal | undefined): Promise<void> {
...
}
Note that Signal is defined in the class, but ignored in the interface.
Full command below:
nswag openapi2tsclient
/output:src/services/generated/StatusApiClient.ts
/input:https://URL/swagger/v1/swagger.json
/ClassName:"{controller}Client"
/NullValue:undefined
/GenerateClientInterfaces:true
/GenerateOptionalParameters:true
/SupportsStrictNullChecks:true
/EnumStyle:StringLiteral
/ServiceSchemes:https
/OperationGenerationMode:MultipleClientsFromFirstTagAndOperationId
/UseAbortSignal:true
/runtime:Net50
Version Info:
NSwag NPM CLI
NSwag command line tool for .NET Core Net50, toolchain v13.13.2.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))
Is this behaviour intentional? I might consider fixing this if its not by design.
tareqimbasher and CruseCtrl
Metadata
Metadata
Assignees
Labels
No labels