Skip to content

Commit 476fc4f

Browse files
update sample docs
1 parent 0ce3128 commit 476fc4f

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

README-nuget.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,24 @@ throw new NotFoundException("Custom not found exception message");
114114
throw new Exception("Custom exception message");
115115
```
116116

117-
### Sample example
118-
Open `docs` folder, inside has a [postman](https://www.postman.com/) collection that could be used for test the sample projects with some requests and validate the middleware in use.
117+
### Samples
118+
Inside the `samples` folder has two projects that could be used for test the and validate the middleware.
119+
120+
#### Run the sample projects
121+
- WebAppTest
122+
```
123+
dotnet run --project .\samples\CustomExceptionMiddleware.WebAppTest\
124+
```
125+
- WebAppTest.Custom
126+
```
127+
dotnet run --project .\samples\CustomExceptionMiddleware.WebAppTest.Custom\
128+
```
129+
#### Samples documentation
130+
- Swagger
131+
- [WebAppTest](http://localhost:5000/swagger/index.html)
132+
- [WebAppTest.Custom](http://localhost:5001/swagger/index.html)
133+
- Postman
134+
- Open `docs` folder, inside has a [postman](https://www.postman.com/) collection that could be used for test.
119135
120136
## Logging
121137
This middleware will `Log` some informations that can be used for monitoring and observability, like `TraceIdentifier`, request and exception informations like message type and stack trace:

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,29 @@ throw new NotFoundException("Custom not found exception message");
113113
throw new Exception("Custom exception message");
114114
```
115115

116-
### Sample example
117-
Open `docs` folder, inside has a [postman](https://www.postman.com/) collection that could be used for test the sample projects with some requests and validate the middleware in use.
116+
### Samples
117+
Inside the `samples` folder has two projects that could be used for test the and validate the middleware.
118+
119+
#### Run the sample projects
120+
- WebAppTest
121+
```
122+
dotnet run --project .\samples\CustomExceptionMiddleware.WebAppTest\
123+
```
124+
- WebAppTest.Custom
125+
```
126+
dotnet run --project .\samples\CustomExceptionMiddleware.WebAppTest.Custom\
127+
```
128+
#### Samples documentation
129+
- Swagger
130+
- [WebAppTest](http://localhost:5000/swagger/index.html)
131+
- [WebAppTest.Custom](http://localhost:5001/swagger/index.html)
132+
- Postman
133+
- Open `docs` folder, inside has a [postman](https://www.postman.com/) collection that could be used for test.
118134
119135
## Logging
120136
This middleware will `Log` some informations that can be used for monitoring and observability, like `TraceIdentifier`, request and exception informations like message type and stack trace:
121137
122138
Example log:
123-
124139
```
125140
Occurred an exception - TraceId: 0HMBO9LGH0JHD:00000002 - ExceptionType: InvalidStateException - Message: Custom domain exception message
126141
CustomExceptionMiddleware.WebAppTest.InvalidStateException: Custom domain exception message

0 commit comments

Comments
 (0)