@http-forge/core 0.2.17 → 0.2.18
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 +7 -0
- package/dist/index.js +164 -164
- package/dist/index.mjs +164 -164
- package/dist/infrastructure/openapi/openapi-exporter.d.ts +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -563,6 +563,8 @@ The core library includes full OpenAPI 3.0.3 import and export with constraint p
|
|
|
563
563
|
|
|
564
564
|
**Export** (`OpenApiExporter`):
|
|
565
565
|
- Generates OpenAPI 3.0.3 specs from collections
|
|
566
|
+
- **Host-variable server resolution** — Any `{{varName}}` that prefixes a request URL (e.g. `{{dcqHost}}/api/...`) is stripped from the path and resolved to a server URL entry. If the variable resolves in the active environment(s), a concrete `url` is added to `servers`. If unresolvable, an OAS server-variable entry is emitted: `url: '{varName}', variables: { varName: { default: '' } }`. This handles arbitrary host variables beyond `{{baseUrl}}`.
|
|
567
|
+
- **Environment variable placeholder sanitization** — `{{varName}}` tokens in parameter examples (path, query, header) and request body examples are replaced with `<varName>` so the exported spec contains readable human placeholders rather than raw template syntax.
|
|
566
568
|
- **Collision-aware merging**: When multiple requests normalize to the same path + HTTP method, they are merged into a single operation:
|
|
567
569
|
- Descriptions are appended, tags are unioned
|
|
568
570
|
- Parameters with the **same constraint kind** (both enum, both pattern, etc.) are merged in-place (union enum values, widen numeric ranges, alternation-join patterns)
|
|
@@ -767,6 +769,11 @@ MIT © Henry Huang
|
|
|
767
769
|
- ✅ **`duplicateFolder(collectionId, folderId, newName)`** — Duplicates a folder within a collection, preserving all nested request content
|
|
768
770
|
- ✅ **`getItemPath(collectionId, itemId)`** — Resolves the disk path of a folder or request within a collection
|
|
769
771
|
|
|
772
|
+
### 0.2.6 (OpenAPI Export — Environment Variable Handling)
|
|
773
|
+
|
|
774
|
+
- ✅ **Host-variable URL stripping** — Any leading `{{varName}}` in a request URL (e.g. `{{dcqHost}}/DCQ/templates/GetEpg`) is now correctly stripped from the path. The variable name is resolved via `envConfigService.resolveVariables()` and the resulting URL is added to `servers`. When the variable cannot be resolved, an OAS server-variable entry (`url: '{varName}', variables: { varName: { default: '' } }`) is emitted instead. Previously, unknown host variables were converted to `/{varName}/...` path segments.
|
|
775
|
+
- ✅ **Example sanitization** — `{{varName}}` placeholders in parameter examples (path, query, header) and request body examples are replaced with `<varName>` so they render as readable human placeholders instead of raw template syntax in the exported spec.
|
|
776
|
+
|
|
770
777
|
### 0.2.5 (OpenAPI Constraint Round-Trip & Collision Merging)
|
|
771
778
|
|
|
772
779
|
- ✅ **Full parameter constraint round-trip** — OpenAPI import/export now preserves all schema constraint fields: `pattern`, `minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum`, `minLength`, `maxLength`, and `oneOf` on both `KeyValueEntry` and `PathParamEntry`
|