You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//To run the Swagger parser we need to pass an array of URLs
@@ -62,6 +65,8 @@ That, does not stop there, you can also populate JSON request bodies in this way
62
65
63
66
[TODO sample JSON Body]
64
67
68
+
`ReplcementValue[]` has precedence over data generation (check below chapter 5).
69
+
65
70
#### 2. AddBasicAuthentication
66
71
If your Swagger.json files are protected by basic authentication, you can set those with `AddBasicAuthentication`.
67
72
@@ -119,11 +124,28 @@ The same swagger-json excerpt which allows load and integration tests.
119
124
##### 3.3 EndpointNameWhitelist
120
125
Final `RequestFilter` option is `EndpointNameWhitelist`. With it you can specify a list of endpoints that will be included in the results.
121
126
122
-
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.
127
+
Every other endpoint will be excluded. In the sample above we have set the result to include only `GetCategories` endpoint.
128
+
That corresponds to the `operationId` in the swagger file above.
129
+
130
+
#### 4. AddBaseUrl
131
+
Your swagger file has a `Server section`, where you can specify an server URI and can be absolute or relative. An example of relative server section is:
132
+
```json
133
+
"servers": [
134
+
{
135
+
"url": "/api/v3"
136
+
}
137
+
],
138
+
```
139
+
In case of relative paths you need to add an absolute base URL to `Swagger Processor` with `AddBaseUrl`, otherwise the one from the `Servers section` will be used.
140
+
141
+
#### 5. AddDataGeneration
142
+
##### !! EXPERIMENTAL !!
143
+
This is an experimental feature. It will generate the missing data in the `List<HttpTestRequest>` object from the swagger models, uri and query parameters.
144
+
`ReplcementValue[]` has precedence over data generation.
if(_swaggerOptions.BaseUrl==null)thrownewException("Swagger from file source needs BaseUrl defined. If absolute URL is defined in swagger file, that one will be used.");
0 commit comments