Skip to content

[Feature request, Angular / Typescript] Type instead of multiple properties for QueryParams #613

Closed
@angelaki

Description

@angelaki

In my opinion it would be nice the pass an object instread of multiple values to the generated api service. If the arguments' orders change this can simply cause problems without noticing it.

E.g. instead of

public GetValues(a?: string, b?: string, c?: string, d?: string, e?: string, f?: boolean, g?: boolean, h?: boolean, i?: number, j?: number, k?: number, l?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext})

I'd rather use

public GetValues(query: { a?: string, b?: string, c?: string, d?: string, e?: string, f?: boolean, g?: boolean, h?: boolean, i?: number, j?: number, k?: number, l?: number }, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext})

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions