-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
6.3.0 System.ArgumentException: Literal sections cannot contain the '?' character. #2385
Comments
Same here. Works in Version 6.2.3 and breaks in 6.3.0. |
Same story |
Still happens in 6.3.1 |
Some more diagnostics and a workaround: Besides the explicit config in the opening post, the same issue is caused when an OData controller has a PATCH/POST/PUT that takes the parameters from query instead of request body:
This causes the relative url to have I worked around this myself by splitting these write operations to a different, non-odata controller |
Still broken in 6.4.0 |
Still broken! Cannot define a route with |
Work-around:
Swashbuckle.AspNetCore.6.4.0-preview-2078.zip
|
As another work-around, migrate to NSwag.AspNetCore and use the following document processor:
Usage, in Startup.cs in ConfigureServices:
|
It still exists in 6.5.0... Any solution for that for shawbuckle package? |
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made. |
Community contributions to fix this are welcome. Otherwise this will continue to be an issue as long as this issue is open. |
Hi,
Recently updated from 6.2.1 to 6.3.0 and stuff started breaking.
I'm running an OData controller via aspnet-api-versioning
Any endpoint within an OData controller with manually defined query parameters results in
System.ArgumentException: The literal section 'QuantityUnits?onlyValid=' is invalid. Literal sections cannot contain the '?' character. (Parameter 'routeTemplate')
Controller and endpoint:
This works in 6.2.1. In 6.2.3 I observed that the swagger.json generation works, but the endpoint produced has a trailing
{
, e.g./api/v1/odata/QuantityUnits{
which of course doesn't really work.Any idea where to start digging?
Full stack trace:
The text was updated successfully, but these errors were encountered: