---
title: "Comment by Iam Merryheart on \"Designing REST APIs in .NET 5\" | Hashnode"
description: "Thank you for taking the time to elaborate on the above subject. I am still kind of new to the tech so permit me to ask the following naive questions. Why did y"
url: "https://hashnode.com/posts/designing-rest-apis-in-net-5/6027f954e522c1626f3723bd/comment/6028f12c355c6669fd17bb47"
---

[Discussion](https://hashnode.com/posts/designing-rest-apis-in-net-5/6027f954e522c1626f3723bd)

Comment [Designing REST APIs in .NET 5](https://hashnode.com/posts/designing-rest-apis-in-net-5/6027f954e522c1626f3723bd)

[Iam Merryheart](https://hashnode.com/@Dyagzy)

[Feb 14, 2021](https://hashnode.com/posts/designing-rest-apis-in-net-5/6027f954e522c1626f3723bd/comment/6028f12c355c6669fd17bb47)

Thank you for taking the time to elaborate on the above subject. I am still kind of new to the tech so permit me to ask the following naive questions.

1.  Why did you have to configure swagger again when by default swagger is already configured to the start up class of the. Net5.0 project template?
    
2.  How did you come about all the data annotations and why did you have to use them on all those controller action methods?
    
3.  I didn't really get the difference between the Update Patch method and why you have to use a JsonPatchDoc and all that.
    

1.  You didn't specify the version number for each of the various nuggets packages you installed am asking because I still get confused on how to know which package number to install on a particular project especially when such a package has different variations of it's packages.
    
2.  For the application to access the table in the database, it has to be configured as a service in the DI (Dependency Injection) Container located in the Startup.cs file. You didn't show the code section for this, I think it was an omission.
    
3.  I am new to everything you had described above so I would like to code along then revert back to you if I have a bug or if I have more questions. Once again I am very grateful for the opportunity to learn from you via this article.
    

[Gabriel](https://hashnode.com/@Overdosengine)

[Feb 14, 2021](https://hashnode.com/posts/designing-rest-apis-in-net-5/6027f954e522c1626f3723bd/comment/6028f12c355c6669fd17bb47#reply-60295d9899eab86a04872524)

1.  I added some custom configuration to add API Versioning into the Swagger Doc in the ConfigureSwaggerOptions class so this demands that I reconfigure the existing configuration model.
    
2.  The data annotations I used are built into the ASP.NET Core runtime. I added them as part of the documentatng status code into Swagger Documentation which is available when you run the application.
    
3.  Using JsonPatchDoc is .NET best practice for PATCH REQUEST. It is different from PUT. PATCH request updates only one part of the resource while with PUT you can update one or more part of the resource.
    

Check [docs.microsoft.com/en-us/aspnet/core/web-api/json…](https://docs.microsoft.com/en-us/aspnet/core/web-api/jsonpatch?view=aspnetcore-5.0) for more on configuring and using PATCH request.

1.  If you're using .NET 5 to follow along you can install the latest version of the nuget package.
    
2.  It's was not omitted. Might be a network challenge from your end.
    
3.  Thanks for your comprehensive feedback. I'm always available if you have more questions.
