Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Query Builder always uses camelCase naming, but Swagger Spec requires PascalCase when using [FromQuery] #231

Open
max-scopp opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@max-scopp
Copy link

Version

2.15.0

Details

Using Gridify and heyapi to get the query options from the URL like so:

    public async Task<IActionResult> GetTasks([FromQuery] GridifyQuery query)

produces the following client type

export type GetApiTasksData = {
    query?: {
        Filter?: string;
        OrderBy?: string;
        Page?: number;
        PageSize?: number;
    };
};

However, the TS Gridify Query builder produces always lowercased query options. This makes the types incompatible without additional mapping or recasting.

Funnily enough, at runtime, it doesn't matter whether the query params are PascalCase or camelCase.
I am assuming that this is just missing something to tell swagger.

Steps to reproduce

  • Acquire the query options using [FromQuery] like above.
  • Check out the Swagger Schema.
@max-scopp max-scopp added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant