NswagDemoDotNet is a sample project that demonstrates the usage of NSwag with ASP.NET Core Web API. It showcases how to generate Swagger documentation and TypeScript client code from the API endpoints using NSwag tooling.
To get started with NswagDemoDotNet, you need to have the following prerequisites installed on your machine:
- .NET Core SDK (version 3.1 or higher)
- Node.js (version 10 or higher)
- NSwag CLI
Follow these steps to install and run the project:
- Clone this repository to your local machine using the following command:
git clone https://github.com/sogue/NswagDemoDotNet.git
- Navigate to the project directory:
cd MyWebAPI
- Build the solution using the .NET CLI:
dotnet build
- Run the project using the .NET CLI:
dotnet run
- Once the project is running, you can access the API endpoints and explore the generated Swagger documentation.
After starting the project, you can access the following URLs:
- Swagger UI: http://localhost:5000/swagger
The Swagger UI provides an interactive interface to explore the API endpoints, make requests, and view responses.
For detailed information on using NSwag with ASP.NET Core Web API, refer to the official NSwag documentation.
Contributions to NswagDemoDotNet are welcome! If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. Pull requests are also appreciated.
This project is licensed under the MIT License.