Skip to content

Commit 331c69e

Browse files
committed
readme update
1 parent 304eea1 commit 331c69e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# QAToolKit.Source.Swagger
22
![.NET Core](https://github.com/qatoolkit/qatoolkit-source-swagger-net/workflows/.NET%20Core/badge.svg)
33

4-
## Description
5-
64
`QAToolKit.Source.Swagger` is a .NET standard library, which generates `IList<HttpTestRequest>` object that is the input for other components.
75

86
Major features:
@@ -51,7 +49,9 @@ IList<HttpTestRequest> requests = await swaggerSource.Load(new Uri[] {
5149

5250
The above code is quite simple, but it needs some explanation.
5351

54-
#### AddReplacementValues
52+
## Description
53+
54+
#### 1. AddReplacementValues
5555
This is a method that will add key/value pairs for replacement values you need to replace in the Swagger requests.
5656

5757
In the example above we say: "Replace `{version}` placeholder in Path and URL parameters and JSON body models."
@@ -62,13 +62,13 @@ That, does not stop there, you can also populate JSON request bodies in this way
6262

6363
[TODO sample JSON Body]
6464

65-
#### AddBasicAuthentication
65+
#### 2. AddBasicAuthentication
6666
If your Swagger.json files are protected by basic authentication, you can set those with `AddBasicAuthentication`.
6767

68-
#### AddRequestFilters
68+
#### 3, AddRequestFilters
6969
Filters comprise of different types. Those are `AuthenticationTypes`, `TestTypes` and `EndpointNameWhitelist`.
7070

71-
##### AuthenticationTypes
71+
##### 3.1. AuthenticationTypes
7272
Here we specify a list of Authentication types, that will be filtered out from the whole swagger file. This is where QA Tool Kit presents a convention.
7373
The built-in types are:
7474
- `AuthenticationType.Customer` which specifies a string `"@customer"`,
@@ -96,7 +96,7 @@ This is an example from swagger.json excerpt:
9696

9797
Parser then finds those string in the description field and populates the `RequestFilter` property.
9898

99-
##### TestTypes
99+
##### 3.2 TestTypes
100100
Similarly as in the `AuthenticationTypes` you can filter out certain endpoints to be used in certain test scenarios. Currently libraray supports:
101101

102102
- TestType.LoadTest which specifies a string `"@loadtest"`,
@@ -116,7 +116,7 @@ The same swagger-json excerpt which allows load and integration tests.
116116
"operationId": "GetCategories",
117117
```
118118

119-
##### EndpointNameWhitelist
119+
##### 3.3 EndpointNameWhitelist
120120
Final `RequestFilter` option is `EndpointNameWhitelist`. With it you can specify a list of endpoints that will be included in the results.
121121

122122
Every other endpoint will be excluded. In the sample above we have set the result to include only `GetCategories` endpoint. That corresponds to the `operationId` in the swagger file above.

0 commit comments

Comments
 (0)