Skip to content

Commit e2f6f5e

Browse files
committed
updated generated file
1 parent 749ae9a commit e2f6f5e

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

web-report/src/types/GeneratedTypes.tsx

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
* and run json-schema-to-typescript to regenerate this file.
66
*/
77

8+
/**
9+
* A unique identifier for an operation. For example, in REST, it would be a HTTP endpoint, including verb, e.g., 'GET:/users/{id}'.
10+
*/
11+
export type OperationId = string;
12+
/**
13+
* A unique identifier for a test case. It could include its name and file location.
14+
*/
15+
export type TestCaseId = string;
16+
export type HttpStatus = number;
17+
/**
18+
* A relative path used to unique locate a test suite file.
19+
*/
20+
export type TestFilePath = string;
21+
822
/**
923
* Schema Definition for Web Fuzzing Commons Reports
1024
*/
@@ -37,7 +51,7 @@ export interface WebFuzzingCommonsReport {
3751
/**
3852
* The list of relative paths (compared to this document) of all the generated test suite files.
3953
*/
40-
test_file_paths: string[];
54+
test_file_paths: TestFilePath[];
4155
/**
4256
* Information on each generated test case.
4357
*/
@@ -63,14 +77,8 @@ export interface Faults {
6377
* Data-structure to represent found faults, based on operations (e.g., HTTP endpoints in REST, and methods in GraphQL and RPC) and which tests find faults in them.
6478
*/
6579
export interface FoundFault {
66-
/**
67-
* A unique identifier for an operation. For example, in REST, it would be a HTTP endpoint, including verb, e.g., 'GET:/users/{id}'.
68-
*/
69-
operation_id?: string;
70-
/**
71-
* A unique identifier for a test case. It could include its name and file location.
72-
*/
73-
test_case_id: string;
80+
operation_id?: OperationId;
81+
test_case_id: TestCaseId;
7482
/**
7583
* @minItems 1
7684
*/
@@ -99,7 +107,7 @@ export interface RESTReport {
99107
/**
100108
* Unique ids of all the endpoints in the tested API.
101109
*/
102-
endpoint_ids: string[];
110+
endpoint_ids: OperationId[];
103111
/**
104112
* List of which HTTP status codes were covered, based on endpoints.
105113
*/
@@ -110,31 +118,19 @@ export interface RESTReport {
110118
* Data-structure to represent which HTTP status code where covered on an endpoint by any of the generated tests.
111119
*/
112120
export interface CoveredEndpoint {
113-
/**
114-
* A unique identifier for an operation. For example, in REST, it would be a HTTP endpoint, including verb, e.g., 'GET:/users/{id}'.
115-
*/
116-
endpoint_id: string;
117-
/**
118-
* A unique identifier for a test case. It could include its name and file location.
119-
*/
120-
test_case_id: string;
121+
endpoint_id: OperationId;
122+
test_case_id: TestCaseId;
121123
/**
122124
* As in a test case the same endpoint could be called more than once, here we report all of the obtained HTTP status codes
123125
*
124126
* @minItems 1
125127
*/
126-
http_status: [number, ...number[]];
128+
http_status: [HttpStatus, ...HttpStatus[]];
127129
[k: string]: unknown;
128130
}
129131
export interface TestCase {
130-
/**
131-
* A unique identifier for a test case. It could include its name and file location.
132-
*/
133-
id?: string;
134-
/**
135-
* A relative path used to unique locate a test suite file.
136-
*/
137-
file_path?: string;
132+
id?: TestCaseId;
133+
file_path?: TestFilePath;
138134
/**
139135
* The name of the test case, as it appears in the generated test file.
140136
*/

0 commit comments

Comments
 (0)