fitting 3.0.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +16 -0
- data/README.md +327 -108
- data/fitting.gemspec +2 -2
- data/images/b1.png +0 -0
- data/images/b2.png +0 -0
- data/images/w1.png +0 -0
- data/images/w2.png +0 -0
- data/lib/fitting/action.rb +105 -0
- data/lib/fitting/cover/json_schema.rb +2 -2
- data/lib/fitting/cover/json_schema_one_of.rb +4 -2
- data/lib/fitting/debug.rb +47 -0
- data/lib/fitting/doc/action.rb +141 -0
- data/lib/fitting/doc/code.rb +53 -0
- data/lib/fitting/doc/combination_enum.rb +110 -0
- data/lib/fitting/doc/combination_one_of.rb +61 -0
- data/lib/fitting/doc/combination_optional.rb +54 -0
- data/lib/fitting/doc/combination_step.rb +48 -0
- data/lib/fitting/doc/content_type.rb +152 -0
- data/lib/fitting/doc/json_schema.rb +112 -0
- data/lib/fitting/doc/step.rb +102 -0
- data/lib/fitting/doc.rb +107 -0
- data/lib/fitting/host.rb +37 -0
- data/lib/fitting/log.rb +102 -0
- data/lib/fitting/nocov.rb +68 -0
- data/lib/fitting/prefix.rb +62 -0
- data/lib/fitting/railtie.rb +0 -1
- data/lib/fitting/records/spherical/request.rb +7 -4
- data/lib/fitting/records/spherical/response.rb +22 -16
- data/lib/fitting/records/tested/request.rb +6 -1
- data/lib/fitting/records/tested/response.rb +6 -1
- data/lib/fitting/rep/html.rb +32 -0
- data/lib/fitting/rep.rb +24 -0
- data/lib/fitting/report/action.rb +9 -15
- data/lib/fitting/report/actions.rb +22 -33
- data/lib/fitting/report/combination.rb +10 -6
- data/lib/fitting/report/combinations.rb +9 -29
- data/lib/fitting/report/prefix.rb +7 -24
- data/lib/fitting/report/prefixes.rb +11 -25
- data/lib/fitting/report/response.rb +12 -22
- data/lib/fitting/report/responses.rb +23 -27
- data/lib/fitting/report/tests.rb +4 -8
- data/lib/fitting/skip/action.rb +44 -0
- data/lib/fitting/skip/api.rb +29 -0
- data/lib/fitting/skip.rb +21 -0
- data/lib/fitting/version.rb +1 -1
- data/lib/fitting.rb +12 -28
- data/lib/tasks/fitting.rake +23 -84
- data/lib/templates/htmlcss/bootstrap-nightshade.min.css +12 -0
- data/lib/templates/htmlcss/bootstrap.min.js +7 -0
- data/lib/templates/htmlcss/darkmode.min.js +6 -0
- data/lib/templates/htmlcss/fitting.html +196 -0
- data/lib/templates/htmlcss/jquery-3.6.0.min.js +2 -0
- metadata +40 -39
- data/lib/fitting/configuration.rb +0 -17
- data/lib/fitting/records/spherical/requests.rb +0 -25
- data/lib/fitting/storage/responses.rb +0 -21
- data/lib/fitting/tests.rb +0 -31
- data/lib/tasks/fitting_outgoing.rake +0 -91
- data/lib/templates/bomboniere/.gitignore +0 -21
- data/lib/templates/bomboniere/.tool-versions +0 -1
- data/lib/templates/bomboniere/README.md +0 -19
- data/lib/templates/bomboniere/dist/css/app.aa2bcd8a.css +0 -1
- data/lib/templates/bomboniere/dist/css/chunk-vendors.ec5f6c3f.css +0 -1
- data/lib/templates/bomboniere/dist/favicon.ico +0 -0
- data/lib/templates/bomboniere/dist/index.html +0 -1
- data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js +0 -2
- data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js.map +0 -1
- data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js +0 -13
- data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js.map +0 -1
- data/lib/templates/bomboniere/package-lock.json +0 -9292
- data/lib/templates/bomboniere/package.json +0 -27
- data/lib/templates/bomboniere/public/favicon.ico +0 -0
- data/lib/templates/bomboniere/public/index.html +0 -17
- data/lib/templates/bomboniere/src/App.vue +0 -102
- data/lib/templates/bomboniere/src/assets/logo.png +0 -0
- data/lib/templates/bomboniere/src/components/HelloWorld.vue +0 -204
- data/lib/templates/bomboniere/src/main.js +0 -10
- data/lib/templates/bomboniere/src/router/index.js +0 -31
- data/lib/templates/bomboniere/src/views/About.vue +0 -5
- data/lib/templates/bomboniere/src/views/Action.vue +0 -173
- data/lib/templates/bomboniere/src/views/Home.vue +0 -17
- data/lib/templates/bomboniere/vue.config.js +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2ee2d75d894fdf2bba32957175322c532007e0ac56afcd1e35f6f2787c63c9c
|
4
|
+
data.tar.gz: 551bc32b2c060397915283b26d970d360954eb3dae25c0e15f26992fe3393e1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06e9c8a1fa3062cb34a9ecb655393691cf856ed28a7605949284b7fb6acb3c0efa9d3d7e7eafc6c7a41ffd7923659816dc8b985b1934e8cf353ae8603365d1ae
|
7
|
+
data.tar.gz: b99972509015910ae7d70a10d65f316e96ac2556230e2b3ed0d6ca33311c68cbb95c7f80c0c59c82eef6f470fcc66e4e0bd247efd811555bfe6091e953c55b95
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
### 4.0.1 - 2023-02-16
|
4
|
+
|
5
|
+
* patch
|
6
|
+
* fix more info error if not found nocov
|
7
|
+
* fix deep nocov
|
8
|
+
* fix deep check result coverage for console
|
9
|
+
|
10
|
+
### 4.0.0 - 2023-02-03
|
11
|
+
|
12
|
+
* features
|
13
|
+
* use fitting*.log instead of new two dirs
|
14
|
+
* output validation details
|
15
|
+
* new cover report
|
16
|
+
* smart skip
|
17
|
+
* smart nocov
|
18
|
+
|
3
19
|
### 3.0.2 - 2022-01-25
|
4
20
|
|
5
21
|
* patch
|
data/README.md
CHANGED
@@ -1,19 +1,90 @@
|
|
1
1
|
# Fitting
|
2
2
|
|
3
3
|
<img align="right" width="192" height="192"
|
4
|
-
alt="
|
4
|
+
alt="Fitting avatar: Documents with hangers"
|
5
5
|
src="./images/logo.png">
|
6
6
|
|
7
|
-
|
8
|
-
This makes it easy to find out how much the documentation matches the implementation.
|
7
|
+
We set up test logs, validate them according to your API documentation and show the documentation coverage with logs.
|
9
8
|
|
10
|
-
|
9
|
+
Test logs setting supports RSpec test (and WebMock stubbing) for Ruby On Rails application and API documentation supports API Blueprint,
|
10
|
+
Swagger and OpenAPI.
|
11
11
|
|
12
|
-
|
12
|
+
This reduces the costs of support, testers and analysts.
|
13
13
|
|
14
|
-
|
14
|
+
Log
|
15
|
+
```text
|
16
|
+
FITTING incoming request {"method":"POST","path":"/public/api/v1/inboxes/tEX5JiZyceiwuKMi1oN9Sf8S/contacts","body":{},"response":{"status":200,"content_type":"application/json","body":{"source_id":"00dbf18d-879e-47cb-ac45-e9aece266eb1","pubsub_token":"ktn6YwPus57JDf4e59eFPom5","id":3291,"name":"shy-surf-401","email":null,"phone_number":null}},"title":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb:9","group":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb","host":"www.example.com"}
|
17
|
+
FITTING outgoing request {"method":"POST","path":"/v1/organizations/org_id/meeting","body":{},"response":{"status":200,"content_type":"application/json","body":{"success":true,"data":{"meeting":{"id":"meeting_id","roomName":"room_name"}}}},"title":"./spec/controllers/api/v1/accounts/integrations/dyte_controller_spec.rb:50","group":"./spec/controllers/api/v1/accounts/integrations/dyte_controller_spec.rb","host":"api.cluster.dyte.in"}
|
18
|
+
```
|
19
|
+
|
20
|
+
validation
|
21
|
+
```console
|
22
|
+
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFF..FFFFFFFFFF....F.......F...FF.....F...F....F..............................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FF.F..FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FF........FFF...FFFF......FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF........FFFFFFFFFFF..FFFFFF..FFFFFFFFFFFFFFFFF.......FFFFFF.............FFFFFFFFFFFF....F........FFF.F...FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF............FF........FFF......FFFFFFFFFFFFFFFFFFFFFF....FFFFFF......F............FFFF........FFFFFFFFFFFFFF.....FFFFFFFFFFFFFFFFFFFFFFF..FF.....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.....FF..........FFFFFFFFFFFFFFFFFF...FFFF...............F.F....FF..FFFFFFFF
|
23
|
+
|
24
|
+
1) Fitting::Doc::NotFound log error:
|
25
|
+
|
26
|
+
host: www.example.com
|
27
|
+
method: POST
|
28
|
+
path: /public/api/v1/inboxes/{inbox_identifier}/contacts
|
29
|
+
code: 200
|
30
|
+
|
31
|
+
content-type: application/json
|
32
|
+
|
33
|
+
json-schema: {
|
34
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
35
|
+
"type": "object",
|
36
|
+
"properties": {
|
37
|
+
"id": {
|
38
|
+
"type": "integer",
|
39
|
+
"description": "Id of the contact"
|
40
|
+
},
|
41
|
+
"source_id": {
|
42
|
+
"type": "string",
|
43
|
+
"description": "The session identifier of the contact"
|
44
|
+
},
|
45
|
+
"name": {
|
46
|
+
"type": "string",
|
47
|
+
"description": "Name of the contact"
|
48
|
+
},
|
49
|
+
"email": {
|
50
|
+
"type": "string",
|
51
|
+
"description": "Email of the contact"
|
52
|
+
},
|
53
|
+
"pubsub_token": {
|
54
|
+
"type": "string",
|
55
|
+
"description": "The token to be used to connect to chatwoot websocket"
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
body: {
|
61
|
+
"source_id": "c9e8c31f-06df-49b4-8fb9-4466457ae65b",
|
62
|
+
"pubsub_token": "Zgc7DEvaj5TkgZ1a4C7AvJXo",
|
63
|
+
"id": 3293,
|
64
|
+
"name": "restless-snowflake-670",
|
65
|
+
"email": null,
|
66
|
+
"phone_number": null
|
67
|
+
}
|
68
|
+
|
69
|
+
error [
|
70
|
+
"The property '#/email' of type null did not match the following type: string in schema e56b7e65-d70c-5f7a-a96c-982df5f8f2f7"
|
71
|
+
]
|
72
|
+
|
73
|
+
...
|
74
|
+
|
75
|
+
804 examples, 565 failure, 0 pending
|
76
|
+
|
77
|
+
Coverage: 65.51%
|
78
|
+
```
|
79
|
+
|
80
|
+
and cover
|
81
|
+

|
15
82
|
|
16
|
-

|
84
|
+
|
85
|
+

|
86
|
+
|
87
|
+

|
17
88
|
|
18
89
|
## Installation
|
19
90
|
Add this line to your application's Gemfile:
|
@@ -32,41 +103,146 @@ $ gem install fitting
|
|
32
103
|
```
|
33
104
|
|
34
105
|
## Usage
|
35
|
-
|
106
|
+
### Log
|
107
|
+
Firstly, improve `test.log`.
|
108
|
+
|
109
|
+
To your `spec_helper.rb`:
|
36
110
|
|
37
111
|
```ruby
|
38
112
|
require 'fitting'
|
39
113
|
|
40
|
-
Fitting.
|
114
|
+
Fitting.logger
|
115
|
+
```
|
116
|
+
|
117
|
+
Delete all files `log/*.log` and run rspec
|
118
|
+
|
119
|
+
You get more information about incoming and outgoing request in `log/fitting*.log`.
|
120
|
+
|
121
|
+
```text
|
122
|
+
FITTING incoming request {"method":"POST","path":"/public/api/v1/inboxes/tEX5JiZyceiwuKMi1oN9Sf8S/contacts","body":{},"response":{"status":200,"content_type":"application/json","body":{"source_id":"00dbf18d-879e-47cb-ac45-e9aece266eb1","pubsub_token":"ktn6YwPus57JDf4e59eFPom5","id":3291,"name":"shy-surf-401","email":null,"phone_number":null}},"title":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb:9","group":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb","host":"www.example.com"}
|
123
|
+
FITTING outgoing request {"method":"POST","path":"/v1/organizations/org_id/meeting","body":{},"response":{"status":200,"content_type":"application/json","body":{"success":true,"data":{"meeting":{"id":"meeting_id","roomName":"room_name"}}}},"title":"./spec/controllers/api/v1/accounts/integrations/dyte_controller_spec.rb:50","group":"./spec/controllers/api/v1/accounts/integrations/dyte_controller_spec.rb","host":"api.cluster.dyte.in"}
|
41
124
|
```
|
42
125
|
|
126
|
+
### Validation
|
127
|
+
Secondly, validate the logs to the documentation.
|
128
|
+
|
43
129
|
Add this to your `.fitting.yml`:
|
44
130
|
|
45
|
-
|
46
|
-
|
131
|
+
```yaml
|
132
|
+
APIs:
|
133
|
+
- host: www.example.com
|
134
|
+
type: openapi2
|
135
|
+
path: swagger/swagger.json
|
136
|
+
```
|
137
|
+
|
138
|
+
Run
|
139
|
+
```bash
|
140
|
+
bundle e rake fitting:validate
|
141
|
+
```
|
142
|
+
|
143
|
+
Console output
|
144
|
+
|
145
|
+
```console
|
146
|
+
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFF..FFFFFFFFFF....F.......F...FF.....F...F....F..............................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FF.F..FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FF........FFF...FFFF......FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF........FFFFFFFFFFF..FFFFFF..FFFFFFFFFFFFFFFFF.......FFFFFF.............FFFFFFFFFFFF....F........FFF.F...FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF............FF........FFF......FFFFFFFFFFFFFFFFFFFFFF....FFFFFF......F............FFFF........FFFFFFFFFFFFFF.....FFFFFFFFFFFFFFFFFFFFFFF..FF.....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.....FF..........FFFFFFFFFFFFFFFFFF...FFFF...............F.F....FF..FFFFFFFF
|
147
|
+
|
148
|
+
1) Fitting::Doc::NotFound log error:
|
149
|
+
|
150
|
+
host: www.example.com
|
151
|
+
method: POST
|
152
|
+
path: /public/api/v1/inboxes/{inbox_identifier}/contacts
|
153
|
+
code: 200
|
154
|
+
|
155
|
+
content-type: application/json
|
156
|
+
|
157
|
+
json-schema: {
|
158
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
159
|
+
"type": "object",
|
160
|
+
"properties": {
|
161
|
+
"id": {
|
162
|
+
"type": "integer",
|
163
|
+
"description": "Id of the contact"
|
164
|
+
},
|
165
|
+
"source_id": {
|
166
|
+
"type": "string",
|
167
|
+
"description": "The session identifier of the contact"
|
168
|
+
},
|
169
|
+
"name": {
|
170
|
+
"type": "string",
|
171
|
+
"description": "Name of the contact"
|
172
|
+
},
|
173
|
+
"email": {
|
174
|
+
"type": "string",
|
175
|
+
"description": "Email of the contact"
|
176
|
+
},
|
177
|
+
"pubsub_token": {
|
178
|
+
"type": "string",
|
179
|
+
"description": "The token to be used to connect to chatwoot websocket"
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
body: {
|
185
|
+
"source_id": "c9e8c31f-06df-49b4-8fb9-4466457ae65b",
|
186
|
+
"pubsub_token": "Zgc7DEvaj5TkgZ1a4C7AvJXo",
|
187
|
+
"id": 3293,
|
188
|
+
"name": "restless-snowflake-670",
|
189
|
+
"email": null,
|
190
|
+
"phone_number": null
|
191
|
+
}
|
192
|
+
|
193
|
+
error [
|
194
|
+
"The property '#/email' of type null did not match the following type: string in schema e56b7e65-d70c-5f7a-a96c-982df5f8f2f7"
|
195
|
+
]
|
196
|
+
|
197
|
+
...
|
198
|
+
|
199
|
+
804 examples, 565 failure, 0 pending
|
200
|
+
|
201
|
+
Coverage: 65.51%
|
202
|
+
```
|
203
|
+
|
204
|
+
### Coverage
|
205
|
+
And task will create HTML (`coverage/fitting.html`) reports.
|
206
|
+
|
207
|
+

|
208
|
+
|
209
|
+

|
210
|
+
|
211
|
+
More information on action coverage
|
212
|
+
|
213
|
+

|
214
|
+
|
215
|
+

|
216
|
+
|
217
|
+
## Settings
|
218
|
+
|
219
|
+
### APIs
|
220
|
+
|
221
|
+
#### type
|
222
|
+
|
223
|
+
##### OpenAPI 2.0
|
224
|
+
Swagger
|
47
225
|
|
48
226
|
```yaml
|
49
|
-
|
50
|
-
-
|
227
|
+
APIs:
|
228
|
+
- host: www.example.com
|
51
229
|
type: openapi2
|
52
|
-
|
53
|
-
- doc.json
|
230
|
+
path: doc/api.json
|
54
231
|
```
|
55
232
|
|
56
|
-
|
233
|
+
##### OpenAPI 3.0
|
57
234
|
Also OpenAPI
|
58
235
|
|
59
236
|
```yaml
|
60
|
-
|
61
|
-
-
|
237
|
+
APIs:
|
238
|
+
- host: www.example.com
|
62
239
|
type: openapi3
|
63
|
-
|
64
|
-
- doc.yaml
|
240
|
+
path: doc/api.json
|
65
241
|
```
|
66
242
|
|
67
|
-
|
68
|
-
First you need to install [drafter](https://github.com/apiaryio/drafter).
|
69
|
-
Works after conversion from API Blueprint to API Elements (in YAML file) with Drafter.
|
243
|
+
##### API Blueprint
|
244
|
+
First you need to install [drafter](https://github.com/apiaryio/drafter) or [crafter](https://github.com/funbox/crafter).
|
245
|
+
Works after conversion from API Blueprint to API Elements (in YAML file) with Drafter or Crafter.
|
70
246
|
|
71
247
|
That is, I mean that you first need to do this
|
72
248
|
|
@@ -74,128 +250,171 @@ That is, I mean that you first need to do this
|
|
74
250
|
drafter doc.apib -o doc.yaml
|
75
251
|
```
|
76
252
|
|
253
|
+
or
|
254
|
+
|
255
|
+
```bash
|
256
|
+
node_modules/.bin/crafter doc.apib > doc.yaml
|
257
|
+
```
|
258
|
+
|
77
259
|
and then
|
78
260
|
|
79
261
|
```yaml
|
80
|
-
|
81
|
-
-
|
262
|
+
APIs:
|
263
|
+
- host: www.example.com
|
82
264
|
type: drafter
|
83
|
-
|
84
|
-
- doc.yaml
|
265
|
+
path: doc/api.yaml
|
85
266
|
```
|
86
267
|
|
87
|
-
|
268
|
+
or
|
269
|
+
|
270
|
+
```yaml
|
271
|
+
APIs:
|
272
|
+
- host: www.example.com
|
273
|
+
type: crafter
|
274
|
+
path: doc/api.yaml
|
275
|
+
```
|
276
|
+
|
277
|
+
##### Tomograph
|
88
278
|
|
89
279
|
To use additional features of the pre-converted [tomograph](https://github.com/funbox/tomograph)
|
90
280
|
|
281
|
+
example
|
282
|
+
|
283
|
+
```bash
|
284
|
+
bundle exec tomograph -d crafter --exclude-description doc/api.yml doc/api.json
|
285
|
+
```
|
286
|
+
|
287
|
+
and then
|
288
|
+
|
91
289
|
```yaml
|
92
|
-
|
93
|
-
-
|
290
|
+
APIs:
|
291
|
+
- host: www.example.com
|
94
292
|
type: tomogram
|
95
|
-
|
96
|
-
- doc.json
|
293
|
+
path: doc/api.json
|
97
294
|
```
|
98
295
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
296
|
+
#### prefix
|
297
|
+
|
298
|
+
Setting the prefix name is optional. For example, you can do this:
|
299
|
+
|
300
|
+
```yaml
|
301
|
+
APIs:
|
302
|
+
- host: www.example.com
|
303
|
+
prefix: /api/v3
|
304
|
+
type: openapi2
|
305
|
+
path: swagger/swagger.json
|
103
306
|
```
|
104
307
|
|
105
|
-
|
106
|
-
|
107
|
-
|
308
|
+
### SkipValidation
|
309
|
+
|
310
|
+
#### host
|
311
|
+
|
312
|
+
It is not necessary to immediately describe each host in detail, you can only specify its name and skip it until you are ready to documented it
|
313
|
+
|
314
|
+
```yaml
|
315
|
+
SkipValidation:
|
316
|
+
- host: api.cluster.dyte.in
|
108
317
|
```
|
109
318
|
|
110
|
-
|
111
|
-
|
112
|
-
|
319
|
+
#### prefix
|
320
|
+
|
321
|
+
If you want to skip a specific prefix in the host
|
322
|
+
|
323
|
+
```yaml
|
324
|
+
SkipValidation:
|
325
|
+
- host: api.cluster.dyte.in
|
326
|
+
prefix: /admin/api
|
113
327
|
```
|
114
328
|
|
115
|
-
|
329
|
+
#### method and path
|
116
330
|
|
117
|
-
|
118
|
-
/api/v1
|
119
|
-
POST /api/v1/accounts/{account_id}/inboxes 0% 200 0% 404 0% 403
|
120
|
-
PATCH /api/v1/accounts/{account_id}/inboxes/{id} 0% 200 0% 404 0% 403
|
121
|
-
POST /api/v1/accounts/{account_id}/inboxes/{id}/set_agent_bot 0% 204 100% 404 0% 403
|
122
|
-
GET /api/v1/agent_bots 0% 200 0% 404 0% 403
|
123
|
-
GET /api/v1/accounts/{account_id}/conversations 0% 200 0% 400 0% description
|
124
|
-
POST /api/v1/accounts/{account_id}/conversations 0% 200 0% 403
|
125
|
-
GET /api/v1/accounts/{account_id}/conversations/{id} 59% 200 0% 404 0% 403
|
126
|
-
POST /api/v1/accounts/{account_id}/conversations/{id}/toggle_status 80% 200 0% 404 0% 403
|
127
|
-
GET /api/v1/accounts/{account_id}/conversations/{id}/messages 47% 200 0% 404 0% 403
|
128
|
-
POST /api/v1/accounts/{account_id}/conversations/{id}/messages 0% 200 0% 404 0% 403
|
129
|
-
GET /api/v1/accounts/{account_id}/conversations/{id}/labels 100% 200 0% 404 0% 403
|
130
|
-
POST /api/v1/accounts/{account_id}/conversations/{id}/labels 100% 200 0% 404 0% 403
|
131
|
-
POST /api/v1/accounts/{account_id}/conversations/{id}/assignments 77% 200 0% 404 0% 403
|
132
|
-
GET /api/v1/accounts/{account_id}/contacts 0% 200 0% 400
|
133
|
-
POST /api/v1/accounts/{account_id}/contacts 14% 200 0% 400
|
134
|
-
GET /api/v1/accounts/{account_id}/contacts/{id} 14% 200 0% 404 0% 403
|
135
|
-
PUT /api/v1/accounts/{account_id}/contacts/{id} 0% 204 0% 404 0% 403
|
136
|
-
GET /api/v1/accounts/{account_id}/contacts/{id}/conversations 0% 200 0% 404 0% 403
|
137
|
-
GET /api/v1/accounts/{account_id}/contacts/search 0% 200 0% 401
|
138
|
-
POST /api/v1/accounts/{account_id}/contacts/{id}/contact_inboxes 0% 200 0% 401 100% 422
|
139
|
-
GET /api/v1/profile 88% 200 100% 401
|
140
|
-
|
141
|
-
tests_without_prefixes: 42
|
142
|
-
tests_without_actions: 144
|
143
|
-
tests_without_responses: 43
|
144
|
-
```
|
145
|
-
|
146
|
-
And task will create HTML (`fitting/index.html`) reports.
|
147
|
-
|
148
|
-

|
331
|
+
If you want to skip a specific request in the host
|
149
332
|
|
150
|
-
|
333
|
+
```yaml
|
334
|
+
SkipValidation:
|
335
|
+
- host: api.cluster.dyte.in
|
336
|
+
method: GET
|
337
|
+
path: /api/v1/cars
|
338
|
+
```
|
151
339
|
|
152
|
-
|
340
|
+
### NoCov
|
153
341
|
|
154
|
-
|
342
|
+
It is not necessary to immediately test each doc in detail, you can only specify its name and skip it until you are ready to test it
|
155
343
|
|
156
|
-
|
344
|
+
#### host
|
345
|
+
```yaml
|
346
|
+
NoCov:
|
347
|
+
- host: sso.test
|
348
|
+
```
|
157
349
|
|
350
|
+
#### method
|
158
351
|
```yaml
|
159
|
-
|
160
|
-
-
|
161
|
-
|
162
|
-
- doc.json
|
352
|
+
NoCov:
|
353
|
+
- host: sso.test
|
354
|
+
method: GET
|
163
355
|
```
|
164
356
|
|
165
|
-
|
357
|
+
#### path
|
358
|
+
```yaml
|
359
|
+
NoCov:
|
360
|
+
- host: sso.test
|
361
|
+
method: GET
|
362
|
+
path: /users/{userId}
|
363
|
+
```
|
364
|
+
|
365
|
+
#### code
|
366
|
+
```yaml
|
367
|
+
NoCov:
|
368
|
+
- host: sso.test
|
369
|
+
method: GET
|
370
|
+
path: /users/{userId}
|
371
|
+
code: 200
|
372
|
+
```
|
166
373
|
|
167
|
-
|
374
|
+
#### content-type
|
168
375
|
```yaml
|
169
|
-
|
170
|
-
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
-
|
175
|
-
skip: true
|
376
|
+
NoCov:
|
377
|
+
- host: sso.test
|
378
|
+
method: GET
|
379
|
+
path: /users/{userId}
|
380
|
+
code: 200
|
381
|
+
content-type: application/json
|
176
382
|
```
|
177
383
|
|
178
|
-
|
384
|
+
#### combination
|
179
385
|
```yaml
|
180
|
-
|
181
|
-
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
-
|
186
|
-
|
386
|
+
NoCov:
|
387
|
+
- host: sso.test
|
388
|
+
method: GET
|
389
|
+
path: /users/{userId}
|
390
|
+
code: 200
|
391
|
+
content-type: application/json
|
392
|
+
combination: oneOf.0
|
187
393
|
```
|
188
394
|
|
189
|
-
|
395
|
+
#### combination_next
|
396
|
+
```yaml
|
397
|
+
NoCov:
|
398
|
+
- host: sso.test
|
399
|
+
method: GET
|
400
|
+
path: /users/{userId}
|
401
|
+
code: 200
|
402
|
+
content-type: application/json
|
403
|
+
combination: oneOf.0
|
404
|
+
combination_next: oneOf.0.required.users
|
405
|
+
```
|
406
|
+
|
407
|
+
### Debug
|
408
|
+
|
409
|
+
If you find bug, you can debug it or create task in this github project with new file `coverage/fitting.debug.yml`
|
190
410
|
|
191
411
|
```yaml
|
192
|
-
|
193
|
-
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
- GET /api/v1/user/{id}
|
412
|
+
Debug:
|
413
|
+
- host: www.example.com
|
414
|
+
method: GET
|
415
|
+
path: /api/v3/users
|
416
|
+
code: 200
|
417
|
+
content-type: application/json
|
199
418
|
```
|
200
419
|
|
201
420
|
## Contributing
|
data/fitting.gemspec
CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.5.0'
|
22
22
|
spec.add_runtime_dependency 'json-schema', '~> 2.6', '>= 2.6.2'
|
23
23
|
spec.add_runtime_dependency 'terminal-table', '~> 3.0', '>= 3.0.2'
|
24
|
-
spec.add_runtime_dependency 'tomograph', '~> 3.1', '>= 3.1.
|
24
|
+
spec.add_runtime_dependency 'tomograph', '~> 3.1', '>= 3.1.5'
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
27
|
spec.add_development_dependency 'byebug', '~> 11.1', '>= 11.1.3'
|
data/images/b1.png
ADDED
Binary file
|
data/images/b2.png
ADDED
Binary file
|
data/images/w1.png
ADDED
Binary file
|
data/images/w2.png
ADDED
Binary file
|