Search posts:
Categories
- ASP.NET (2)
- Documentation (6)
- F# (1)
- object-oriented-principles (1)
- programming (1)
- Selenium (2)
- software-patterns (1)
- SpecFlow (1)
- SysInternals (1)
- Uncategorized (2)
- Unit test (4)
- VS 2013 tips (1)
- WEB API (6)
- XML (1)
Archieves
- November 2019 (1)
- June 2019 (1)
- January 2018 (1)
- November 2017 (4)
- October 2017 (1)
- November 2016 (2)
- September 2016 (1)
- May 2016 (1)
- April 2016 (1)
- March 2016 (2)
- September 2015 (1)
- June 2015 (2)
- December 2014 (2)
Blogs I Follow
Top Posts & Pages
- ApprovalTests > Customize output file names
- Generate WinMerge report file on CI server when running Approval tests
- Documentation
- ASP.NET WEB API documentation using Swagger – Global operation for 500 response code
- ASP.NET WEB API documentation using Swagger - Extend schema generation using SchemaFilters and FluentValidation rules
Tag Archives: WEB API
ASP.NET WEB API documentation using Swagger – Global operation for 500 response code
Some api response codes, such as 500 for Internal server error, are the same for all API endpoints. Let’s see how to implement such general behaviour using Swashbuckle. Add below classes: Register new operation filter in SwaggerConfig.cs And after running … Continue reading
ASP.NET WEB API documentation using Swagger – Extend schema generation using SchemaFilters and FluentValidation rules
In this post we will see how to extend schema generation using FluentValidation rules. We will see how to display min/max constraints for Integer type in Swagger UI and how to extend default examples to show valid email for email attribute.To … Continue reading
ASP.NET Web API documentation using Swagger – Useful links
Some of good additions to Swagger might be quite difficult to find so I put useful links here: Generating model examples: https://mattfrear.com/2015/04/21/generating-swagger-example-responses-with-swashbuckle #1 https://mattfrear.com/2016/01/25/generating-swagger-example-requests-with-swashbuckle #2 https://github.com/mattfrear/Swashbuckle.Examples Using markdown in descriptions: It is possible to render really cool description in Swagger … Continue reading
ASP.NET Web API documentation using Swagger – Use schema mapper for generic data types
If get back to previous post, you could see that descriptions for StartDate and EndDate are duplicated. DateTime description shall be consistent across all API, so to not repeat yourself let’s use MapType feature of Swashbuckle configuration. Open SwaggerConfig and … Continue reading
ASP.NET Web API documentation using Swagger – Add custom headers
In this post, we will look into how to add custom headers to your Swagger documentation using Swashbuckle. We will add well-known “Accept-Language” header with conditionally visibility based on API method! Setup application culture based on Accept-Language header First, add … Continue reading
ASP.NET Web API documentation using Swagger – Introduction
Providing always up-to-date and exhaustive documentation for your WEB API could be quite a challenging task. Swagger and Swashbuckle did a great job to provide uniform documentation for any kind of API. Let’s look into this using simple demo discount API example. … Continue reading