8000 Query string parameters only accept string type declaration · Issue #64 · nomasystems/erf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Query string parameters only accept string type declaration #64

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

Open
albertocsouto opened this issue Apr 12, 2024 · 2 comments
Open

Query string parameters only accept string type declaration #64

albertocsouto opened this issue Apr 12, 2024 · 2 comments
Assignees

Comments

@albertocsouto
Copy link
Contributor
albertocsouto commented Apr 12, 2024

Query string parameters not declared as string always fail, producing a 400 error. This is a sample:

{
  "name": "page",
  "in": "query",
  "description": "The page to retrieve. A fixed maximum number of elements N is returned on each call. A value of P on the `page` parameter will skip (P - 1) * N elements on the retrieval process and return the following elements.",
  "required": false,
  "schema": {
    "type": "integer"
  }
}

Currently the only workaround possible is to declare as string all the parameters and converting them in the callback module.

@github-project-automation github-project-automation bot moved this to 📑 TODO in erf Apr 12, 2024
@albertocsouto albertocsouto changed the title Error when declaring querystring value as integer Query string parameters only accept string type declaration May 3, 2024
@albertocsouto albertocsouto self-assigned this May 9, 2025
@albertocsouto albertocsouto moved this from 📑 TODO to :shipit: In Progress in erf May 9, 2025
@albertocsouto
Copy link
Contributor Author
albertocsouto commented May 9, 2025

It's a complex one, we have to convert the parsed value before inject to validator. What happens now is the validator always receive a binary string. For example:

  ParameterModuleBool:is_valid(<<"true">>)

or

  ParameterModuleNumber:is_valid(<<"1">>)

@albertocsouto
Copy link
Contributor Author
albertocsouto commented May 12, 2025

I'm trying to implement the default serialization way proposed by the spec:
https://spec.openapis.org/oas/v3.0.3.html#fixed-fields-9

  • style: form
  • explode: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: :shipit: In Progress
Development

No branches or pull requests

1 participant
0