@postman-cse/onboarding-bootstrap 1.2.3 → 2.0.0
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 +22 -16
- package/action.yml +17 -6
- package/dist/action.cjs +130735 -20761
- package/dist/cli.cjs +130825 -20860
- package/dist/index.cjs +130736 -20761
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -36,11 +36,11 @@ jobs:
|
|
|
36
36
|
steps:
|
|
37
37
|
- uses: actions/checkout@v5
|
|
38
38
|
- id: postman_token
|
|
39
|
-
uses: postman-cs/postman-resolve-service-token-action@
|
|
39
|
+
uses: postman-cs/postman-resolve-service-token-action@v2
|
|
40
40
|
with:
|
|
41
41
|
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
42
42
|
postman-region: us
|
|
43
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
43
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
44
44
|
with:
|
|
45
45
|
project-name: core-payments
|
|
46
46
|
spec-url: https://raw.githubusercontent.com/postman-cs/postman-bootstrap-action/main/examples/core-payments-openapi.yaml
|
|
@@ -50,7 +50,7 @@ jobs:
|
|
|
50
50
|
credential-preflight: enforce
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Provide either `spec-url` (public HTTPS) or `spec-path` (a file in the checked-out repo) for the [Spec Hub import](https://learning.postman.com/docs/design-apis/specifications/import-a-specification/) path.
|
|
53
|
+
Provide either `spec-url` (public HTTPS) or `spec-path` (a file in the checked-out repo) for the [Spec Hub import](https://learning.postman.com/docs/design-apis/specifications/import-a-specification/) path. Mint the `postman-access-token` with the [service-token action](https://github.com/postman-cs/postman-resolve-service-token-action): it is the primary credential and carries every Postman asset operation (workspace, spec, collection generation and mutation, tagging, team scope) over the access-token gateway. A [Postman service account](https://learning.postman.com/docs/administration/service-accounts/) PMAK for `postman-api-key` is optional — it mints and re-mints that access token and logs the Postman CLI in for `spec lint`. See [Obtaining Credentials](docs/credentials.md) for the credential matrix and legacy fallback.
|
|
54
54
|
|
|
55
55
|
## Common scenarios
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ For Git-first workflows, read the OpenAPI document directly from the checked-out
|
|
|
60
60
|
|
|
61
61
|
```yaml
|
|
62
62
|
- uses: actions/checkout@v5
|
|
63
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
63
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
64
64
|
with:
|
|
65
65
|
project-name: core-payments
|
|
66
66
|
spec-path: apis/core-payments/openapi.yaml
|
|
@@ -72,7 +72,7 @@ For Git-first workflows, read the OpenAPI document directly from the checked-out
|
|
|
72
72
|
Pass `workspace-id`, `spec-id`, and existing collection IDs to rerun without creating duplicate Postman assets. When `.postman/resources.yaml` is committed on the checked-out ref, the action reuses its workspace, spec, and collection mappings automatically.
|
|
73
73
|
|
|
74
74
|
```yaml
|
|
75
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
75
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
76
76
|
with:
|
|
77
77
|
project-name: core-payments
|
|
78
78
|
workspace-id: ws-123
|
|
@@ -89,7 +89,7 @@ Pass `workspace-id`, `spec-id`, and existing collection IDs to rerun without cre
|
|
|
89
89
|
Create a release-scoped spec and collection set instead of refreshing the canonical assets in place:
|
|
90
90
|
|
|
91
91
|
```yaml
|
|
92
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
92
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
93
93
|
with:
|
|
94
94
|
project-name: core-payments
|
|
95
95
|
spec-url: https://raw.githubusercontent.com/postman-cs/postman-bootstrap-action/main/examples/core-payments-openapi.yaml
|
|
@@ -109,7 +109,7 @@ Compare the incoming contract before any Postman mutation. `pr-native` mode diff
|
|
|
109
109
|
- uses: actions/checkout@v5
|
|
110
110
|
with:
|
|
111
111
|
fetch-depth: 0
|
|
112
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
112
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
113
113
|
with:
|
|
114
114
|
project-name: core-payments
|
|
115
115
|
spec-path: apis/core-payments/openapi.yaml
|
|
@@ -127,12 +127,12 @@ Set the repository custom property `postman-governance-group`, then provide toke
|
|
|
127
127
|
|
|
128
128
|
```yaml
|
|
129
129
|
- id: postman-token
|
|
130
|
-
uses: postman-cs/postman-resolve-service-token-action@
|
|
130
|
+
uses: postman-cs/postman-resolve-service-token-action@v2
|
|
131
131
|
with:
|
|
132
132
|
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
133
133
|
postman-region: us
|
|
134
134
|
|
|
135
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
135
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
136
136
|
with:
|
|
137
137
|
project-name: core-payments
|
|
138
138
|
spec-url: https://raw.githubusercontent.com/postman-cs/postman-bootstrap-action/main/examples/core-payments-openapi.yaml
|
|
@@ -149,7 +149,7 @@ For one-off runs, `governance-group` can be passed directly and overrides the re
|
|
|
149
149
|
Postman organizations with multiple sub-teams require an explicit `workspace-team-id` for workspace creation:
|
|
150
150
|
|
|
151
151
|
```yaml
|
|
152
|
-
- uses: postman-cs/postman-bootstrap-action@
|
|
152
|
+
- uses: postman-cs/postman-bootstrap-action@v2
|
|
153
153
|
with:
|
|
154
154
|
project-name: core-payments
|
|
155
155
|
spec-url: https://raw.githubusercontent.com/postman-cs/postman-bootstrap-action/main/examples/core-payments-openapi.yaml
|
|
@@ -169,6 +169,7 @@ See [Team Identity](docs/team-identity.md) for sub-team discovery and team-ID de
|
|
|
169
169
|
| `baseline-collection-id` | Existing baseline collection ID | no | |
|
|
170
170
|
| `smoke-collection-id` | Existing smoke collection ID | no | |
|
|
171
171
|
| `contract-collection-id` | Existing contract collection ID | no | |
|
|
172
|
+
| `additional-collections-dir` | Workspace-relative directory containing curated Postman collection JSON/YAML files to create or update in the workspace. | no | |
|
|
172
173
|
| `sync-examples` | Whether linked spec/collection relations should enable example syncing | no | `true` |
|
|
173
174
|
| `collection-sync-mode` | Collection lifecycle policy (refresh or version) | no | `refresh` |
|
|
174
175
|
| `spec-sync-mode` | Spec lifecycle policy (update or version) | no | `update` |
|
|
@@ -179,9 +180,11 @@ See [Team Identity](docs/team-identity.md) for sub-team discovery and team-ID de
|
|
|
179
180
|
| `governance-group` | Postman governance workspace group name. Overrides the postman-governance-group repository custom property and domain mapping. | no | |
|
|
180
181
|
| `requester-email` | Requester email for audit context | no | |
|
|
181
182
|
| `workspace-admin-user-ids` | Comma-separated workspace admin user ids | no | |
|
|
182
|
-
| `workspace-team-id` | Numeric sub-team ID for org-mode workspace creation. Required when
|
|
183
|
+
| `workspace-team-id` | Numeric sub-team ID for org-mode workspace creation. Required when your Postman team is an org with multiple sub-teams. Run the action without this input to see available sub-teams listed in the error output. | no | |
|
|
183
184
|
| `spec-url` | HTTPS URL to the OpenAPI document to bootstrap. Provide either spec-url or spec-path. | no | |
|
|
184
185
|
| `spec-path` | Local filesystem path to the OpenAPI document (relative to the workspace). Provide either spec-url or spec-path. | no | |
|
|
186
|
+
| `protocol` | API spec protocol. auto (default) detects from content/extension. openapi flows through Spec Hub; graphql (SDL/introspection), grpc (.proto), and soap (WSDL) build and instrument a Postman collection directly. | no | `auto` |
|
|
187
|
+
| `protocol-endpoint-url` | Endpoint URL/authority used by generated non-OpenAPI requests (e.g. {{baseUrl}}/graphql, grpc://host:port). Supports Postman variable interpolation. Ignored for openapi. | no | |
|
|
185
188
|
| `openapi-version` | OpenAPI specification version override (3.0 or 3.1). When not set, the version is auto-detected from the spec content. | no | |
|
|
186
189
|
| `breaking-change-mode` | OpenAPI breaking-change comparison mode (off, pr-native, baseline-only, or previous-spec) | no | `off` |
|
|
187
190
|
| `breaking-baseline-spec-path` | Workspace-relative baseline OpenAPI spec path used by baseline-only mode and pr-native fallback | no | |
|
|
@@ -192,8 +195,8 @@ See [Team Identity](docs/team-identity.md) for sub-team discovery and team-ID de
|
|
|
192
195
|
| `governance-mapping-json` | Legacy JSON map of business domain to governance group name. Prefer governance-group or the postman-governance-group repository custom property. | no | `{}` |
|
|
193
196
|
| `github-token` | GitHub token used to read the postman-governance-group repository custom property | no | |
|
|
194
197
|
| `gh-fallback-token` | Fallback GitHub token used to read repository custom properties when github-token cannot | no | |
|
|
195
|
-
| `postman-api-key` | Postman API key used for
|
|
196
|
-
| `postman-access-token` | Postman access token
|
|
198
|
+
| `postman-api-key` | Postman service-account API key (PMAK). With a postman-access-token present, the PMAK is used ONLY to mint/re-mint the access token and to log in the Postman CLI for `spec lint` — never for an asset operation. When the key is absent, the CLI spec lint is skipped (governance errors are not enforced). Optional. | no | |
|
|
199
|
+
| `postman-access-token` | Postman service-account access token (x-access-token). Primary credential — every asset operation (workspace create/visibility, spec upload/update, collection generation/read/mutation, test injection, tagging, team-scope) runs through the access-token gateway. Mint it with postman-resolve-service-token-action. Optional only for legacy PMAK-only runs; supply it for the gateway path. | no | |
|
|
197
200
|
| `credential-preflight` | Credential identity preflight policy. warn (default) logs a note and continues when postman-api-key and postman-access-token resolve to different parent orgs; enforce fails the run on that condition before any workspace is created. | no | `warn` |
|
|
198
201
|
| `folder-strategy` | Folder organization strategy for generated collections (Paths or Tags) | no | `Paths` |
|
|
199
202
|
| `nested-folder-hierarchy` | When folder-strategy is Tags, enables nested folder hierarchy | no | `false` |
|
|
@@ -214,7 +217,7 @@ See [Team Identity](docs/team-identity.md) for sub-team discovery and team-ID de
|
|
|
214
217
|
| `smoke-collection-id` | Smoke collection ID | n/a | n/a |
|
|
215
218
|
| `contract-collection-id` | Contract collection ID | n/a | n/a |
|
|
216
219
|
| `collections-json` | JSON summary of generated collections | n/a | n/a |
|
|
217
|
-
| `lint-summary-json` | JSON summary of lint errors and warnings | n/a | n/a |
|
|
220
|
+
| `lint-summary-json` | JSON summary of lint errors and warnings. When postman-api-key is absent the CLI lint is skipped and this is { status: "skipped", reason: "no postman-api-key" }. | n/a | n/a |
|
|
218
221
|
| `breaking-change-status` | OpenAPI breaking-change check status | n/a | n/a |
|
|
219
222
|
| `breaking-change-summary-json` | JSON summary of the OpenAPI breaking-change check | n/a | n/a |
|
|
220
223
|
<!-- outputs-table:end -->
|
|
@@ -286,11 +289,12 @@ steps:
|
|
|
286
289
|
The action handles the bootstrap slice of the Postman onboarding workflow: create or reuse a Postman workspace, assign governance, invite the requester and workspace admins, upload or update the spec in [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/), lint it with the [Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-governance/), generate or reuse baseline, smoke, and contract collections, inject generated tests, apply tags, and reuse committed `.postman/resources.yaml` state when present. Inputs and outputs use kebab-case.
|
|
287
290
|
|
|
288
291
|
- **Phase independence:** bootstrap succeeds on its own even when later pipeline stages (repo sync, Insights) fail, and reruns reuse existing assets. See [Bootstrap Phase Independence](docs/bootstrap-phase-independence.md).
|
|
289
|
-
- **Team identity:** the
|
|
292
|
+
- **Team identity:** the team ID is resolved from the access-token session identity; org-mode tenants pass `workspace-team-id` for the sub-team that should own the workspace. See [Team Identity](docs/team-identity.md).
|
|
290
293
|
- **Git providers:** workspace-to-repository linking supports GitHub and GitLab, cloud and self-hosted. See [Git Provider Support](docs/git-provider-support.md).
|
|
291
294
|
- **Spec handling:** operation summaries are normalized before upload, `spec-url` fetches are SSRF-hardened HTTPS with pinned DNS, and breaking-change comparison runs before any Postman mutation when enabled. See [OpenAPI Spec Handling](docs/spec-handling.md).
|
|
292
295
|
- **Lifecycle modes:** `collection-sync-mode` (`refresh`/`version`, legacy `reuse`), `spec-sync-mode` (`update`/`version`), release-label derivation, ref-native state, cloud spec-to-collection syncing, and smoke monitoring. See [Lifecycle Modes and Operational Reference](docs/lifecycle-and-operations.md).
|
|
293
|
-
- **Credentials:** `postman-
|
|
296
|
+
- **Credentials:** `postman-access-token` is the primary credential and carries every asset operation over the gateway; the optional `postman-api-key` powers access-token minting and the Postman CLI `spec lint` login. See [Obtaining Credentials](docs/credentials.md).
|
|
297
|
+
- **Protocol write split:** GraphQL and SOAP build v2.1.0 collections created through the public collections API with `postman-api-key`. gRPC builds a v3/Extensible Collection (the only schema with the `grpc-request` item type) and is created through the gateway EC API, which is access-token only — so gRPC **hard-requires** `postman-access-token` and fails fast with `EC_REQUIRES_ACCESS_TOKEN` when it is absent (`resolve-service-token` mints one). Creating the gRPC collection and running it in CI are separate gates: execution additionally needs the `grpc_protocol_execution_allowed` account feature flag in Postman CLI. See [Multi-Protocol Contract Assertions](docs/MULTIPROTOCOL-ASSERTIONS.md).
|
|
294
298
|
|
|
295
299
|
## Dynamic contract tests
|
|
296
300
|
|
|
@@ -319,6 +323,8 @@ Dynamic contract failures and warnings use `CONTRACT_` error codes. Remediation
|
|
|
319
323
|
| `CONTRACT_UNSUPPORTED_SCHEMA_DIALECT` | A schema declared an unsupported JSON Schema dialect. | Use draft-07 or 2020-12-compatible schemas. |
|
|
320
324
|
| `CONTRACT_SCHEMA_COMPILE_FAILED` | schemasafe could not compile a response/header schema. | Simplify or correct the unsupported schema. |
|
|
321
325
|
| `CONTRACT_STATIC_REQUEST_CHECK_FAILED` | Generated request missed a required non-security parameter or body. | Adjust generation options or the spec so generated requests include required shape. |
|
|
326
|
+
| `CONTRACT_STATIC_REQUEST_CHECK_SKIPPED` | A static request-shape check could not be evaluated over the v3 collection surface (the request could not be reconstructed from the item IR). | Non-fatal; the runtime contract script still validates the response. Regenerate the collection if it persists. |
|
|
327
|
+
| `CONTRACT_COLLECTION_FORMAT_UNSUPPORTED` | A protocol collection builder returned a non-v3 format; only v3/Extensible Collections are created (access-token EC API). | File a bug; the builder must emit v3-ec. No v2 collection is ever created. |
|
|
322
328
|
| `CONTRACT_SECURITY_NOT_VALIDATED` | Security requirements were detected but dynamic tests cannot prove auth at runtime. | Run dedicated auth tests and review generated requests for required credentials. |
|
|
323
329
|
| `CONTRACT_WEBHOOKS_NOT_VALIDATED` | OpenAPI webhooks were present but are not included in dynamic contract coverage. | Validate webhook behavior separately or model required behavior under `paths`. |
|
|
324
330
|
| `CONTRACT_CALLBACKS_NOT_VALIDATED` | Operation callbacks were present but are not included in dynamic contract coverage. | Validate callback behavior separately or add dedicated tests. |
|
package/action.yml
CHANGED
|
@@ -21,6 +21,9 @@ inputs:
|
|
|
21
21
|
contract-collection-id:
|
|
22
22
|
description: Existing contract collection ID
|
|
23
23
|
required: false
|
|
24
|
+
additional-collections-dir:
|
|
25
|
+
description: Workspace-relative directory containing curated Postman collection JSON/YAML files to create or update in the workspace.
|
|
26
|
+
required: false
|
|
24
27
|
sync-examples:
|
|
25
28
|
description: Whether linked spec/collection relations should enable example syncing
|
|
26
29
|
required: false
|
|
@@ -56,8 +59,8 @@ inputs:
|
|
|
56
59
|
required: false
|
|
57
60
|
workspace-team-id:
|
|
58
61
|
description: >-
|
|
59
|
-
Numeric sub-team ID for org-mode workspace creation. Required when
|
|
60
|
-
|
|
62
|
+
Numeric sub-team ID for org-mode workspace creation. Required when your
|
|
63
|
+
Postman team is an org with multiple sub-teams. Run the action without
|
|
61
64
|
this input to see available sub-teams listed in the error output.
|
|
62
65
|
required: false
|
|
63
66
|
spec-url:
|
|
@@ -66,6 +69,14 @@ inputs:
|
|
|
66
69
|
spec-path:
|
|
67
70
|
description: Local filesystem path to the OpenAPI document (relative to the workspace). Provide either spec-url or spec-path.
|
|
68
71
|
required: false
|
|
72
|
+
protocol:
|
|
73
|
+
description: API spec protocol. auto (default) detects from content/extension. openapi flows through Spec Hub; graphql (SDL/introspection), grpc (.proto), and soap (WSDL) build and instrument a Postman collection directly.
|
|
74
|
+
required: false
|
|
75
|
+
default: auto
|
|
76
|
+
protocol-endpoint-url:
|
|
77
|
+
description: Endpoint URL/authority used by generated non-OpenAPI requests (e.g. {{baseUrl}}/graphql, grpc://host:port). Supports Postman variable interpolation. Ignored for openapi.
|
|
78
|
+
required: false
|
|
79
|
+
default: ''
|
|
69
80
|
openapi-version:
|
|
70
81
|
description: OpenAPI specification version override (3.0 or 3.1). When not set, the version is auto-detected from the spec content.
|
|
71
82
|
required: false
|
|
@@ -103,10 +114,10 @@ inputs:
|
|
|
103
114
|
description: Fallback GitHub token used to read repository custom properties when github-token cannot
|
|
104
115
|
required: false
|
|
105
116
|
postman-api-key:
|
|
106
|
-
description: Postman API key used for
|
|
107
|
-
required:
|
|
117
|
+
description: Postman service-account API key (PMAK). With a postman-access-token present, the PMAK is used ONLY to mint/re-mint the access token and to log in the Postman CLI for `spec lint` — never for an asset operation. When the key is absent, the CLI spec lint is skipped (governance errors are not enforced). Optional.
|
|
118
|
+
required: false
|
|
108
119
|
postman-access-token:
|
|
109
|
-
description: Postman access token
|
|
120
|
+
description: Postman service-account access token (x-access-token). Primary credential — every asset operation (workspace create/visibility, spec upload/update, collection generation/read/mutation, test injection, tagging, team-scope) runs through the access-token gateway. Mint it with postman-resolve-service-token-action. Optional only for legacy PMAK-only runs; supply it for the gateway path.
|
|
110
121
|
required: false
|
|
111
122
|
credential-preflight:
|
|
112
123
|
description: "Credential identity preflight policy. warn (default) logs a note and continues when postman-api-key and postman-access-token resolve to different parent orgs; enforce fails the run on that condition before any workspace is created."
|
|
@@ -153,7 +164,7 @@ outputs:
|
|
|
153
164
|
collections-json:
|
|
154
165
|
description: JSON summary of generated collections
|
|
155
166
|
lint-summary-json:
|
|
156
|
-
description: JSON summary of lint errors and warnings
|
|
167
|
+
description: 'JSON summary of lint errors and warnings. When postman-api-key is absent the CLI lint is skipped and this is { status: "skipped", reason: "no postman-api-key" }.'
|
|
157
168
|
breaking-change-status:
|
|
158
169
|
description: OpenAPI breaking-change check status
|
|
159
170
|
breaking-change-summary-json:
|