Skip to content

feat: support the HTTP QUERY method (RFC 10008) - #4007

Open
gentritabazi wants to merge 1 commit into
nestjs:masterfrom
gentritabazi:feat/http-query-method
Open

feat: support the HTTP QUERY method (RFC 10008)#4007
gentritabazi wants to merge 1 commit into
nestjs:masterfrom
gentritabazi:feat/http-query-method

Conversation

@gentritabazi

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

PathItemObject has no query operation field, so routes declared with the new HTTP QUERY method (RFC 10008, added to RequestMethod in nestjs/nest#17162) cannot be represented in the generated OpenAPI document.

Issue Number: N/A

What is the new behavior?

PathItemObject accepts an optional query operation, so controllers using RequestMethod.QUERY are exposed under the query method in the generated document — including their requestBody (QUERY is defined as a safe method that carries a body). A test covers a @RequestMapping({ method: RequestMethod.QUERY }) route end to end through SwaggerExplorer, asserting the method, path, request body schema, and response.

Note: the query operation key requires OpenAPI >= 3.2.0, so documents using it should set the version via DocumentBuilder#setOpenAPIVersion('3.2.0').

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Depends on nestjs/nest#17162 (RequestMethod.QUERY). The added test will pass once a @nestjs/common release includes that enum member.

@gentritabazi
gentritabazi force-pushed the feat/http-query-method branch from 5ab2c5f to 17aba2a Compare July 14, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant