swagger-api / swagger-api/swagger-codegen
[aspnetcore] Server generation does not manage pipeline context properly
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
The server asp.net core code generated by Swagger.editor, does not work properly.
When you execute the UI from Visual studio 2017, you are not able to try the API because you always get a 404 error saying that the operators and the channel property are missing (both of them are mandatory)
By debugging the code, seems clear that the two propeties are not part of the context.ActionArguments checked in the ValidateModelStateAttribute class.
I am using the file generate by the current version of https://editor.swagger.io/
Here is the definition file:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the generated ASP.NET Core server and the ValidateModelStateAttribute mentioned in the report. Reproduce the 404 with the attached Swagger definition in Visual Studio 2017, then verify that operators and channel reach ActionArguments and the API request no longer fails because they are missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100