aws / aws/aws-toolkit-visual-studio

API Gateway/Lambda template endpoints failing locally

Open
#244 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
135
Forks
37
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
`ValuesController` GET endpoints aren't reached properly when running locally. For example, ".../api/values/get" actually uses the ".../api/values/get/{id}" endpoint and returns `value` in the response, rather than `["value1", "value2"]`, and POST requests fail to bind JSON bodies to function models which result in null reference exceptions in the function body.

**To Reproduce**
1. Create a new AWS Serverless Application (.NET Core - C#) project using the "ASP.NET Core Web API" template
2. Run the project locally
3. Test the controller endpoints using a browser/Postman

**Expected behavior**
All endpoints respond as expected and bind successfully.

- Visual Studio Version: 2022
- AWS Toolkit for Visual Studio Version: 1.28.0.0

Contributor guide

Open the contributing guide

Research direction

Create the AWS Serverless Application using the ASP.NET Core Web API template and run it locally, then exercise the ValuesController GET and POST endpoints with a browser or Postman. Compare the observed route selection and JSON model binding with the expected behavior; done means the collection GET, item GET, and POST requests reach the intended endpoints and bind request bodies without null-reference failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
api, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.