@http-forge/core 0.6.10 → 0.6.11
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.
- package/README.md +51 -1054
- package/dist/index.js +69 -69
- package/dist/index.mjs +65 -65
- package/dist/infrastructure/openapi/openapi-exporter.d.ts +5 -0
- package/dist/types/types.d.ts +36 -0
- package/package.json +16 -3
|
@@ -93,6 +93,11 @@ export declare class OpenApiExporter {
|
|
|
93
93
|
private tryParseBodyContent;
|
|
94
94
|
private buildFormDataSchemaFromBody;
|
|
95
95
|
private buildResponses;
|
|
96
|
+
/**
|
|
97
|
+
* Map operation-level response definitions (from metadata) to OpenAPI format.
|
|
98
|
+
* Converts OperationResponse[] indexed by status code into OpenAPI responses object.
|
|
99
|
+
*/
|
|
100
|
+
private mapResponseDefinitions;
|
|
96
101
|
private buildOperationSecurity;
|
|
97
102
|
private mapAuthToSecurityScheme;
|
|
98
103
|
private parseScopes;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -39,6 +39,24 @@ export interface UnifiedFolder {
|
|
|
39
39
|
scripts?: CollectionScripts;
|
|
40
40
|
items: (UnifiedFolder | UnifiedRequest)[];
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Operation example (for OpenAPI generation)
|
|
44
|
+
*/
|
|
45
|
+
export interface OperationExample {
|
|
46
|
+
name: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
value: any;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Operation response definition (for OpenAPI generation)
|
|
52
|
+
*/
|
|
53
|
+
export interface OperationResponse {
|
|
54
|
+
description: string;
|
|
55
|
+
contentType?: string;
|
|
56
|
+
schema?: JSONSchema7;
|
|
57
|
+
examples?: Record<string, any>;
|
|
58
|
+
headers?: Record<string, KeyValueEntry>;
|
|
59
|
+
}
|
|
42
60
|
/**
|
|
43
61
|
* Unified Request - normalized request format
|
|
44
62
|
* Supports full feature set from CollectionRequest with metadata preservation
|
|
@@ -71,6 +89,18 @@ export interface UnifiedRequest {
|
|
|
71
89
|
responseSchema?: ResponseSchemaDefinition;
|
|
72
90
|
/** Body schema for validation */
|
|
73
91
|
bodySchema?: BodySchemaDefinition;
|
|
92
|
+
/** Explicit OpenAPI operationId (e.g., from @Operation, @RequestMapping) */
|
|
93
|
+
operationId?: string;
|
|
94
|
+
/** Explicit OpenAPI summary, separate from name */
|
|
95
|
+
summary?: string;
|
|
96
|
+
/** Explicit OpenAPI tags (e.g., from @Tag, controller class) */
|
|
97
|
+
tags?: string[];
|
|
98
|
+
/** Request/response examples for OpenAPI */
|
|
99
|
+
examples?: OperationExample[];
|
|
100
|
+
/** Per-status-code response definitions */
|
|
101
|
+
responses?: Record<string, OperationResponse>;
|
|
102
|
+
/** Operation-level security requirements */
|
|
103
|
+
security?: Record<string, string[]>[];
|
|
74
104
|
}
|
|
75
105
|
/**
|
|
76
106
|
* Collection-level scripts
|
|
@@ -578,6 +608,12 @@ export interface CollectionRequest {
|
|
|
578
608
|
deprecated?: boolean;
|
|
579
609
|
responseSchema?: ResponseSchemaDefinition;
|
|
580
610
|
bodySchema?: BodySchemaDefinition;
|
|
611
|
+
operationId?: string;
|
|
612
|
+
summary?: string;
|
|
613
|
+
tags?: string[];
|
|
614
|
+
examples?: OperationExample[];
|
|
615
|
+
responses?: Record<string, OperationResponse>;
|
|
616
|
+
security?: Record<string, string[]>[];
|
|
581
617
|
}
|
|
582
618
|
/**
|
|
583
619
|
* Encoded request body ready for HTTP transmission
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@http-forge/core",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Headless
|
|
3
|
+
"version": "0.6.11",
|
|
4
|
+
"description": "Headless Postman-compatible API testing engine for Node.js, CI/CD, OpenAPI workflows, and HTTP Forge automation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -27,18 +27,31 @@
|
|
|
27
27
|
"clean": "rimraf dist"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
|
+
"http-forge",
|
|
30
31
|
"http",
|
|
31
32
|
"api",
|
|
33
|
+
"api engine",
|
|
32
34
|
"testing",
|
|
35
|
+
"api testing",
|
|
33
36
|
"automation",
|
|
34
37
|
"postman",
|
|
38
|
+
"postman alternative",
|
|
39
|
+
"postman runtime",
|
|
35
40
|
"collection",
|
|
41
|
+
"openapi",
|
|
42
|
+
"openapi testing",
|
|
36
43
|
"scripting",
|
|
37
44
|
"variables",
|
|
38
45
|
"cookies",
|
|
39
46
|
"ci-cd",
|
|
47
|
+
"ci",
|
|
48
|
+
"cd",
|
|
40
49
|
"headless",
|
|
41
|
-
"
|
|
50
|
+
"headless api testing",
|
|
51
|
+
"nodejs",
|
|
52
|
+
"mcp",
|
|
53
|
+
"mcp server",
|
|
54
|
+
"runtime"
|
|
42
55
|
],
|
|
43
56
|
"author": "Henry Huang",
|
|
44
57
|
"license": "MIT",
|