Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eb17bfc
Copy TypeSpec files from azure-rest-api-specs and common-types from A…
kimorris27 Apr 22, 2026
c35225c
Prepare container image for use in TypeSpec `make` targets
kimorris27 Apr 22, 2026
27f8855
Add `make generate-swagger-typespec` and preserve previous `make gene…
kimorris27 Apr 22, 2026
ecb8a0a
`make generate` and make `api` the source of truth for the current st…
kimorris27 Apr 22, 2026
d6f77f0
Update `make generate` to handle checksums for API versions in new `a…
kimorris27 Apr 22, 2026
5eb96c2
Update Swagger generation script and generate CI check to account for…
kimorris27 Apr 22, 2026
473ea90
Small fixes
kimorris27 Apr 23, 2026
107b49b
Update AI agent docs and add a human doc
kimorris27 Apr 23, 2026
eeebf49
Remove containerization of TypeSpec stuff and `make generate-swagger-…
kimorris27 Apr 24, 2026
43004df
Case sensitivity fix
kimorris27 Apr 24, 2026
d845bbd
Appease yaml linter
kimorris27 Apr 24, 2026
1668c50
Various small fixes recommended by Copilot
kimorris27 Apr 24, 2026
4e17d67
Add npm audit to CI for the new npm package in the api directory
kimorris27 Apr 28, 2026
cc1d2b0
`npm audit fix --force` to get us from 5 moderate vulns to 6 low
kimorris27 Apr 28, 2026
336a63d
Remove `generate-swagger-typespec` from `make generate` and add CI to…
kimorris27 Apr 28, 2026
1d06957
Add formatting for the TypeSpec to the CI diff check
kimorris27 Apr 28, 2026
60ad094
Leverage hacks instead of doing a separate, bespoke thing in this file
kimorris27 Apr 28, 2026
5f040da
Remove unused `generate.go` files from `pkg/api` version subdirectories
kimorris27 Apr 29, 2026
febe7f7
Try updating node version per Copilot's recommendation
kimorris27 Apr 29, 2026
9142253
Quote shell variable usages per Copilot's recommendation
kimorris27 Apr 29, 2026
110eb99
Treat path as a fixed pattern rather than interpreting as a regex per…
kimorris27 Apr 29, 2026
c4ee148
Remove 2025-07-25 from suppressions since it is generated from TypeSp…
kimorris27 May 1, 2026
4084e7d
Fix summary for patch
kimorris27 May 1, 2026
d6feeea
Small doc fixes per Copilot's recommendations
kimorris27 May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci-api-swagger-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-api-swagger-diff

on:
push:
tags:
- v*
branches:
- master
pull_request:

permissions:
contents: read

jobs:
api-swagger-diff-check:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 20.12.0
cache: npm
cache-dependency-path: api/package-lock.json

- name: Generate from TypeSpec
run: hack/api/swagger-from-typespec.sh

- name: Verify no diffs in api or swagger
run: hack/ci-utils/isClean.sh
16 changes: 11 additions & 5 deletions .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@ permissions:
contents: read

jobs:
npm-audit-portal-v2:
name: npm-audit-portal-v2
npm-audit:
name: npm-audit-${{ matrix.package-dir }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package-dir:
- portal/v2
- api
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: setup Node.JS
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 16.16.0
node-version: 20.12.0

- name: Run NPM Audit
run: bash ${GITHUB_WORKSPACE}/hack/github-actions/npm_audit.sh
run: bash ${GITHUB_WORKSPACE}/hack/github-actions/npm_audit.sh "${{ matrix.package-dir }}"
shell: bash

npm-build-check:
Expand All @@ -38,7 +44,7 @@ jobs:
- name: setup Node.JS
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 16.16.0
node-version: 20.12.0

- name: Run NPM Build
working-directory: ./portal/v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ gomock_reflect_*
/e2e-report.xml
/deploy/config.yaml
**/*.swp
/api/node_modules/
/portal/v2/node_modules/
portal/v2/.vscode/
.idea*
Expand Down
2 changes: 1 addition & 1 deletion .sha256sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ a392b1c5dead633f31ba2b24ce8efd86ad071e7cd2471695ca489555de626449 swagger/redhat
912fd1e2f9396a31ee2ebcbd048ccc6611a73e92f13ac6562bce2244a02d4a50 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-09-04/redhatopenshift.json
1117ecabb245d2703dfbb38d78559bf41f7c4e177fb8619e35a3b2a74ba63ddb swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2023-11-22/redhatopenshift.json
4a3e401d72a482043debea2c375ac709e0f93027b2e47bc8a72a9f5e59c65556 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/preview/2024-08-12-preview/redhatopenshift.json
2343d78c13894906eeab28c37bc15f04f459abd90a01905174654f64d42b89dc swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2025-07-25/redhatopenshift.json
ecfe8b8e8f2895c0b833d2bcb7672839608d3a82bdb17fa96933b2332e10ab9c api/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/OpenShiftClusters/stable/2025-07-25/redhatopenshift.json
24 changes: 16 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ clean: ## Remove build artifacts
find -type d -name 'gomock_reflect_[0-9]*' -exec rm -rf {} \+ 2>/dev/null

.PHONY: client
client: generate client-generate lint-go-fix lint-go
client: generate generate-swagger-typespec client-generate lint-go-fix lint-go

.PHONY: client-generate
client-generate: ## Fix stale client library
hack/apiclients/generate-swagger-checksum.sh 2020-04-30 2021-09-01-preview 2022-04-01 2022-09-04 2023-04-01 2023-07-01-preview 2023-09-04 2023-11-22 2024-08-12-preview 2025-07-25
# Only generate the clients we use in our dev Python extension or in e2e clients
hack/apiclients/build-dev-api-clients.sh "${AUTOREST_IMAGE}" 2024-08-12-preview 2025-07-25
hack/api/build-dev-api-clients.sh "${AUTOREST_IMAGE}" 2024-08-12-preview 2025-07-25

# TODO: hard coding dev-config.yaml is clunky; it is also probably convenient to
# override COMMIT.
Expand All @@ -144,14 +143,23 @@ discoverycache: ## Fix out-of-date discovery cache
$(MAKE) generate

.PHONY: generate
generate: install-tools generate-swagger ## Generate files & content for serving ARO-RP
generate: install-tools ## Generate files & content for serving ARO-RP
go generate ./...
Comment thread
kimorris27 marked this conversation as resolved.
$(MAKE) imports

.PHONY: generate-swagger
generate-swagger:
go run ./hack/swagger github.com/Azure/ARO-RP/pkg/api/v20240812preview ./swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/preview/2024-08-12-preview
go run ./hack/swagger github.com/Azure/ARO-RP/pkg/api/v20250725 ./swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/stable/2025-07-25
.PHONY: generate-swagger-legacy
generate-swagger-legacy:
go run ./hack/swagger-legacy github.com/Azure/ARO-RP/pkg/api/v20240812preview ./swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/preview/2024-08-12-preview
$(MAKE) swagger-checksums

.PHONY: generate-swagger-typespec
generate-swagger-typespec:
hack/api/swagger-from-typespec.sh
$(MAKE) swagger-checksums
Comment thread
kimorris27 marked this conversation as resolved.

.PHONY: swagger-checksums
swagger-checksums:
hack/api/generate-swagger-checksum.sh 2020-04-30 2021-09-01-preview 2022-04-01 2022-09-04 2023-04-01 2023-07-01-preview 2023-09-04 2023-11-22 2024-08-12-preview 2025-07-25

# TODO: This does not work outside of GOROOT. We should replace all usage of the
# clientset with controller-runtime so we don't need to generate it.
Expand Down
76 changes: 76 additions & 0 deletions api/common-types/data-plane/v1/types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Common types"
},
"paths": {},
"definitions": {
"ErrorDetail": {
"type": "object",
"description": "The error detail.",
"properties": {
"code": {
"readOnly": true,
"type": "string",
"description": "The error code."
},
"message": {
"readOnly": true,
"type": "string",
"description": "The error message."
},
"target": {
"readOnly": true,
"type": "string",
"description": "The error target."
},
"details": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
},
"x-ms-identifiers": [],
"description": "The error details."
},
"additionalInfo": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorAdditionalInfo"
},
"x-ms-identifiers": [],
"description": "The error additional info."
}
}
},
"ErrorResponse": {
"type": "object",
"title": "Error response",
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
"properties": {
"error": {
"description": "The error object.",
"$ref": "#/definitions/ErrorDetail"
}
}
},
"ErrorAdditionalInfo": {
"type": "object",
"properties": {
"type": {
"readOnly": true,
"type": "string",
"description": "The additional info type."
},
"info": {
"readOnly": true,
"type": "object",
"description": "The additional info."
}
},
"description": "The resource management error additional info."
}
}
}
182 changes: 182 additions & 0 deletions api/common-types/resource-management/v1/privatelinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Common types"
},
"paths": {},
"definitions": {
"PrivateEndpoint": {
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "The ARM identifier for Private Endpoint"
}
},
"description": "The Private Endpoint resource."
},
"PrivateEndpointConnection": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateEndpointConnectionProperties",
"x-ms-client-flatten": true,
"description": "Resource properties."
}
},
"allOf": [
{
"$ref": "./types.json#/definitions/Resource"
}
],
"description": "The Private Endpoint Connection resource."
},
"PrivateEndpointConnectionProperties": {
"type": "object",
"properties": {
"privateEndpoint": {
"$ref": "#/definitions/PrivateEndpoint",
"description": "The resource of private end point."
},
"privateLinkServiceConnectionState": {
"$ref": "#/definitions/PrivateLinkServiceConnectionState",
"description": "A collection of information about the state of the connection between service consumer and provider."
},
"provisioningState": {
"$ref": "#/definitions/PrivateEndpointConnectionProvisioningState",
"description": "The provisioning state of the private endpoint connection resource."
}
},
"required": [
"privateLinkServiceConnectionState"
],
"description": "Properties of the PrivateEndpointConnectProperties."
},
"PrivateLinkServiceConnectionState": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/PrivateEndpointServiceConnectionStatus",
"description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service."
},
"description": {
"type": "string",
"description": "The reason for approval/rejection of the connection."
},
"actionsRequired": {
"type": "string",
"description": "A message indicating if changes on the service provider require any updates on the consumer."
}
},
"description": "A collection of information about the state of the connection between service consumer and provider."
},
"PrivateEndpointServiceConnectionStatus": {
"type": "string",
"description": "The private endpoint connection status.",
"enum": [
"Pending",
"Approved",
"Rejected"
],
"x-ms-enum": {
"name": "PrivateEndpointServiceConnectionStatus",
"modelAsString": true
}
},
"PrivateEndpointConnectionProvisioningState": {
"type": "string",
"readOnly": true,
"description": "The current provisioning state.",
"enum": [
"Succeeded",
"Creating",
"Deleting",
"Failed"
],
"x-ms-enum": {
"name": "PrivateEndpointConnectionProvisioningState",
"modelAsString": true
}
},
"PrivateLinkResource": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateLinkResourceProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "./types.json#/definitions/Resource"
}
],
"description": "A private link resource"
},
"PrivateLinkResourceProperties": {
"type": "object",
"properties": {
"groupId": {
"description": "The private link resource group id.",
"type": "string",
"readOnly": true
},
"requiredMembers": {
"description": "The private link resource required member names.",
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
},
"requiredZoneNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "The private link resource Private link DNS zone name."
}
},
"description": "Properties of a private link resource."
},
"PrivateEndpointConnectionListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private endpoint connections",
"items": {
"$ref": "#/definitions/PrivateEndpointConnection"
}
}
},
"description": "List of private endpoint connection associated with the specified storage account"
},
"PrivateLinkResourceListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private link resources",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
}
},
"description": "A list of private link resources"
}
},
"parameters": {
"PrivateEndpointConnectionName": {
"name": "privateEndpointConnectionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the private endpoint connection associated with the Azure resource",
"x-ms-parameter-location": "method"
}
}
}
Loading
Loading