@postman-cse/onboarding-azure-spec-discovery 1.0.1 → 1.2.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 +26 -8
- package/action.yml +8 -4
- package/dist/cli.cjs +104057 -91191
- package/dist/index.cjs +107098 -93999
- package/docs/providers.md +53 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@ Zero-config discovery and export of API specs from Azure services using only you
|
|
|
7
7
|
The action resolves the best specification source for the current repository in this order:
|
|
8
8
|
|
|
9
9
|
1. **Repo spec** — an OpenAPI/Swagger file already committed to the repository wins outright; Azure is never called.
|
|
10
|
-
2. **Azure API Management (APIM)** —
|
|
10
|
+
2. **Azure API Management (APIM)** — current HTTP APIs as OpenAPI, SOAP APIs as native WSDL, and GraphQL APIs as native SDL plus a partial derived OpenAPI `/graphql` POST shell.
|
|
11
11
|
3. **App Service API definition** — a site whose `apiDefinition.url` points at a reachable OpenAPI document.
|
|
12
12
|
4. **Local Azure IaC** — OpenAPI content embedded in ARM/Bicep templates or referenced by `azure.yaml` in the repository.
|
|
13
13
|
|
|
14
|
-
When several Azure candidates match, a four-tier narrowing pipeline (IaC fingerprint, resource-group correlation,
|
|
14
|
+
When several Azure candidates match, a four-tier narrowing pipeline (IaC fingerprint, resource-group correlation, repo-tag prefilter, naming heuristic) orders them, and genuinely ambiguous results surface as a ranked GitHub Step Summary table instead of a guess. The tag prefilter selects outright when exactly one candidate carries a select-grade repo tag for the calling repository: canonical `postman:repo=<org>/<repo>`, the Fox-style `GithubOrg`/`GithubRepo` pair, or any extra keys supplied via the CLI-only `--repo-tag-keys-json` flag. Tag names and values compare case-insensitively (a trailing `.git` is tolerated), and when enumerated candidates carry no matching tags a single targeted Resource Graph tag lookup runs as a fallback — so a gateway tagged with its owning repo resolves automatically, per service repo, with zero further configuration.
|
|
15
15
|
|
|
16
16
|
## Auth and Postman handoff
|
|
17
17
|
|
|
@@ -65,6 +65,16 @@ jobs:
|
|
|
65
65
|
resource-group: payments-rg
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
### discover-estate mode
|
|
69
|
+
|
|
70
|
+
Enumerates repo-associated Azure resources across the whole subscription — one Resource Graph sweep over `Resources` and `ResourceContainers` for repo tags (`postman:repo`, `github:repository`, `GithubOrg`/`GithubRepo`, `repo`, `repository`), deduped to an org/repo roster written as `repos.json` and emitted on `repos-json`/`repo-count`. Association only: no spec export, no PRs, no GitHub writes.
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
- uses: postman-cs/postman-azure-spec-discovery-action@v1
|
|
74
|
+
with:
|
|
75
|
+
mode: discover-estate
|
|
76
|
+
```
|
|
77
|
+
|
|
68
78
|
### Chaining into Postman API onboarding
|
|
69
79
|
|
|
70
80
|
```yaml
|
|
@@ -92,7 +102,7 @@ The CLI exposes every action input as a `--kebab-case` flag plus CLI-only flags
|
|
|
92
102
|
<!-- inputs-table:start -->
|
|
93
103
|
| Name | Description | Required | Default |
|
|
94
104
|
| --- | --- | --- | --- |
|
|
95
|
-
| `mode` | Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate. | no | `resolve-one` |
|
|
105
|
+
| `mode` | Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate; discover-estate enumerates repo-associated Azure resources across the subscription without exporting specs. | no | `resolve-one` |
|
|
96
106
|
| `subscription-id` | Optional Azure subscription ID used as the discovery enumeration root. When omitted, the single enabled subscription visible to the credential is used; multiple enabled subscriptions require this input. | no | n/a |
|
|
97
107
|
| `resource-group` | Optional resource group that scopes discovery to one group instead of the whole subscription. | no | n/a |
|
|
98
108
|
| `api-id` | Optional full APIM API ARM resource ID for this service. Use this to bypass broader subscription discovery. | no | n/a |
|
|
@@ -108,7 +118,7 @@ The CLI exposes every action input as a `--kebab-case` flag plus CLI-only flags
|
|
|
108
118
|
| --- | --- |
|
|
109
119
|
| `resolution-json` | JSON resolution result describing status, source type, confidence, and evidence. |
|
|
110
120
|
| `resolution-status` | Resolution status: resolved or unresolved. |
|
|
111
|
-
| `source-type` | Resolved source type: repo-spec, apim-export, app-service-api-definition, iac-embedded, manual-review, or discover-many. |
|
|
121
|
+
| `source-type` | Resolved source type: repo-spec, apim-export, app-service-api-definition, iac-embedded, custom-api-swagger, logic-apps-workflow, template-spec-embedded, event-grid-webhook, service-bus-topic, function-bindings-trigger, manual-review, or discover-many. |
|
|
112
122
|
| `mapping-confidence` | Numeric confidence score for the selected service candidate. |
|
|
113
123
|
| `spec-path` | Path to the resolved or generated specification when available. |
|
|
114
124
|
| `api-id` | Full APIM API ARM resource ID for APIM resolutions; empty for App Service or IaC-local resolutions. |
|
|
@@ -117,8 +127,8 @@ The CLI exposes every action input as a `--kebab-case` flag plus CLI-only flags
|
|
|
117
127
|
| `service-count` | discover-many output: number of exported services. |
|
|
118
128
|
| `export-summary-json` | JSON summary of attempted, exported, failed, and skipped candidates. |
|
|
119
129
|
| `candidates-json` | Ranked ambiguous candidates as JSON when resolution is unresolved with at least two candidates; empty otherwise. |
|
|
120
|
-
| `provider-type` | Provider that produced the resolved spec: apim, app-service, or
|
|
121
|
-
| `spec-format` | Format of the resolved spec: openapi-yaml or
|
|
130
|
+
| `provider-type` | Provider that produced the resolved spec: apim, app-service, iac-local, custom-apis, logic-apps, template-specs, event-grid, service-bus, or function-bindings. |
|
|
131
|
+
| `spec-format` | Format of the resolved spec: openapi-yaml, openapi-json, wsdl, or graphql-sdl. |
|
|
122
132
|
| `contract-origin` | Compatibility output; always empty in v1. |
|
|
123
133
|
| `contract-metadata-path` | Compatibility output; always empty in v1. |
|
|
124
134
|
| `variant-count` | Compatibility output; always empty in v1. |
|
|
@@ -128,17 +138,25 @@ The CLI exposes every action input as a `--kebab-case` flag plus CLI-only flags
|
|
|
128
138
|
| `derived-openapi-format` | Serialization format of the derived OpenAPI document: openapi-json. |
|
|
129
139
|
| `derived-openapi-evidence-json` | JSON array of evidence strings describing how the derived OpenAPI document was produced. |
|
|
130
140
|
| `narrowing-strategy` | Narrowing tier that produced the candidate ordering: iac-fingerprint, rg-correlation, tag-prefilter, naming-heuristic, or none. |
|
|
141
|
+
| `repos-json` | discover-estate output: JSON array of deduped org/repo associations discovered from repo tags across the subscription; empty otherwise. |
|
|
142
|
+
| `repo-count` | discover-estate output: number of deduped org/repo associations; empty otherwise. |
|
|
131
143
|
<!-- outputs-table:end -->
|
|
132
144
|
|
|
133
145
|
## Supported providers
|
|
134
146
|
|
|
135
147
|
| Provider | Source | Exported format |
|
|
136
148
|
| --- | --- | --- |
|
|
137
|
-
| `apim` | Azure API Management current HTTP API revision
|
|
149
|
+
| `apim` | Azure API Management current HTTP, SOAP, or GraphQL API revision | OpenAPI JSON; native WSDL; native GraphQL SDL + partial OpenAPI 3.0.3 derivation |
|
|
138
150
|
| `app-service` | App Service `siteConfig.apiDefinition.url` document | OpenAPI JSON or YAML |
|
|
151
|
+
| `custom-apis` | Logic Apps custom connector inline swagger (`Microsoft.Web/customApis`) | Swagger/OpenAPI JSON |
|
|
152
|
+
| `logic-apps` | Consumption Logic App HTTP Request triggers (`Microsoft.Logic/workflows`) | Partial OpenAPI 3.0 JSON (synthesized) |
|
|
153
|
+
| `template-specs` | Template Spec version embedded APIM inline documents (`Microsoft.Resources/templateSpecs/versions`) | OpenAPI/Swagger JSON (partial) |
|
|
154
|
+
| `event-grid` | Event Grid topic/domain/system-topic webhook subscriptions (synthesized delivery contract) | OpenAPI 3.0 JSON (partial) |
|
|
155
|
+
| `service-bus` | Service Bus topic/subscription/rule metadata (synthesized publish contract) | OpenAPI 3.0 JSON (partial) |
|
|
156
|
+
| `function-bindings` | Azure Functions trigger bindings (`sites/functions` config.bindings) | OpenAPI 3.0 JSON (partial) |
|
|
139
157
|
| `iac-local` | OpenAPI embedded in repo ARM/Bicep templates or referenced by `azure.yaml` | OpenAPI JSON or YAML |
|
|
140
158
|
|
|
141
|
-
|
|
159
|
+
APIM SOAP and GraphQL APIs are exportable; WebSocket, gRPC, and OData remain visible-unsupported candidates routed to manual review. Service- and workspace-scoped APIM APIs are both enumerated. Custom connectors without an inline swagger document stay visible as manual-review candidates. Azure API Center, Container Apps, and management-group enumeration are out of scope for now.
|
|
142
160
|
|
|
143
161
|
## How it works
|
|
144
162
|
|
package/action.yml
CHANGED
|
@@ -6,7 +6,7 @@ branding:
|
|
|
6
6
|
color: orange
|
|
7
7
|
inputs:
|
|
8
8
|
mode:
|
|
9
|
-
description: 'Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate.'
|
|
9
|
+
description: 'Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate; discover-estate enumerates repo-associated Azure resources across the subscription without exporting specs.'
|
|
10
10
|
required: false
|
|
11
11
|
default: resolve-one
|
|
12
12
|
subscription-id:
|
|
@@ -39,7 +39,7 @@ outputs:
|
|
|
39
39
|
resolution-status:
|
|
40
40
|
description: 'Resolution status: resolved or unresolved.'
|
|
41
41
|
source-type:
|
|
42
|
-
description: 'Resolved source type: repo-spec, apim-export, app-service-api-definition, iac-embedded, manual-review, or discover-many.'
|
|
42
|
+
description: 'Resolved source type: repo-spec, apim-export, app-service-api-definition, iac-embedded, custom-api-swagger, logic-apps-workflow, template-spec-embedded, event-grid-webhook, service-bus-topic, function-bindings-trigger, manual-review, or discover-many.'
|
|
43
43
|
mapping-confidence:
|
|
44
44
|
description: Numeric confidence score for the selected service candidate.
|
|
45
45
|
spec-path:
|
|
@@ -57,9 +57,9 @@ outputs:
|
|
|
57
57
|
candidates-json:
|
|
58
58
|
description: Ranked ambiguous candidates as JSON when resolution is unresolved with at least two candidates; empty otherwise.
|
|
59
59
|
provider-type:
|
|
60
|
-
description: 'Provider that produced the resolved spec: apim, app-service, or
|
|
60
|
+
description: 'Provider that produced the resolved spec: apim, app-service, iac-local, custom-apis, logic-apps, template-specs, event-grid, service-bus, or function-bindings.'
|
|
61
61
|
spec-format:
|
|
62
|
-
description: 'Format of the resolved spec: openapi-yaml or
|
|
62
|
+
description: 'Format of the resolved spec: openapi-yaml, openapi-json, wsdl, or graphql-sdl.'
|
|
63
63
|
contract-origin:
|
|
64
64
|
description: Compatibility output; always empty in v1.
|
|
65
65
|
contract-metadata-path:
|
|
@@ -78,6 +78,10 @@ outputs:
|
|
|
78
78
|
description: JSON array of evidence strings describing how the derived OpenAPI document was produced.
|
|
79
79
|
narrowing-strategy:
|
|
80
80
|
description: 'Narrowing tier that produced the candidate ordering: iac-fingerprint, rg-correlation, tag-prefilter, naming-heuristic, or none.'
|
|
81
|
+
repos-json:
|
|
82
|
+
description: 'discover-estate output: JSON array of deduped org/repo associations discovered from repo tags across the subscription; empty otherwise.'
|
|
83
|
+
repo-count:
|
|
84
|
+
description: 'discover-estate output: number of deduped org/repo associations; empty otherwise.'
|
|
81
85
|
runs:
|
|
82
86
|
using: node24
|
|
83
87
|
main: dist/index.cjs
|