GetContributionAreas is returning bad values

See screenshot attahced. The result from the API is not retunring any valud area types, just string "Your Contribution Area" without any IDs. This results in the inability to do a POST for a new contribution as the new contribution doesnt have a valid ID for ContributionArea. Here is part of the result from the server, notice the ForeignKey contraint error. It chokes on the fact that I can't pass up a valid ID ContributionArea.Id... "The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_msft_contributions_msft_technology_on_msft_technologyid\". The conflict occurred in database \"MVPProd\", table \"dbo.msft_technology\"

Comments

  •  
    You can run and test this yourself directly, the project is on GitHub and runnable out of the box: 1 - Clone this repo https://github.com/LanceMcCarthy/MvpApi 2 - Run it and click the "+" in the vertical menu (on the left, under the hamberger button) to navigate to ContributionDetailPage 3 - An example contribution will preload for you, click the save button in the appbar This will show you that an error has occured. To see the invalid data, go to the view model and put a breakpoint when the ContributionTechnologies return: ContributionViewModel.cs on line 141-144 is when the technologies return.
    Posted by Hidden Sun, 28 Jan 2018 04:01:31 GMT
  •  
    Disregard, you can close this. I was able to get the get the right data by changign the mode to match the new schema
    Posted by Hidden Sun, 28 Jan 2018 04:10:35 GMT
  •  
    Final feedback is that you should update your swagger defintion. The reason I got into this mess is that the models defined in the swagger are wrong.
    Posted by Hidden Sun, 28 Jan 2018 04:55:11 GMT


You're not signed in. Please sign-in to report an issue or post a comment.