Code in this repository supports an article I am writing for 24 days in Umbraco that discusses how to document an API using Attributes and Swagger.
It atempts to replicate the "Update an Existing Pet" action found at https://editor.swagger.io/. Whilst demonstrating:
- Adding XML Comments to the Open API documentation
- Documenting Enums
- Documenting responses
- Adding a licence and description to an OpenAPI specification
The code samples for the article can be found https://github.com/RachBreeze/2022-24-Days-In-Umbraco/tree/main/PetAPI
The article also discusses setting
in the <GenerateDocumentationFile>true</GenerateDocumentationFile>
.csproj
file. The output from doing this is found at https://github.com/RachBreeze/2022-24-Days-In-Umbraco/blob/main/PetAPI.xml
As the code in this repository is written to support the article there are currently no plans to upgrade the versions of the NuGet packages referenced with in the code base. It is supplied as is.