fix: api description contain invalid request type for GET requests#1507
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Jun 27, 2025
Merged
fix: api description contain invalid request type for GET requests#1507jeremydmiller merged 1 commit intoJasperFx:mainfrom
jeremydmiller merged 1 commit intoJasperFx:mainfrom
Conversation
- in practice this means, [FromQuery] T ends up as the request body - as everything is a RequestType, it's not straight forward to exclude concrete query items - this is likely to be a problem with a POST request that combines a body and a concrete query - for now updating to check if the documentation is for a GET
Contributor
Author
|
Just got a notification that the build has failed, I did check on my local using the docker setup, so apologies if I have missed something. I'll re-run locally and see what is happening. |
This was referenced Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tiny adjustment, the ensures that when generating the open api documentation, GET endpoints do not have request bodies and adds a couple of tests.
Currently, if the GET endpoint uses
[FromQuery] ComplexTthe type will shows up as the request body and is required.This is incorrect, as these values are expected on the query string, not the request body.
This means that the swagger tooling can not be used to submit a request to the API and the generated JSON does not match the api specification.
In an ideal standard compliant world, the GET would support a request body (even though it's weird), but from looking at how RequestType works within the system, it would be a larger change, and from looking at some of the code, I'm not sure Wolverine supports this anyway.