Azure / Azure/apiops-cli

serviceUrl (and other ARM-level API properties) from overrides file are silently dropped when API has a specification

Đang mở
#141 1 bình luận 0 reaction 1 người được giao Được @azaslonov nhận Xem trên GitHub
P1
Ngôn ngữ chính
TypeScript
Star
26
Fork
9
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
20

Mô tả

When an API has a specification file, publishRootApi() sends a single PUT containing both the override-merged properties (like serviceUrl) and spec body (properties.format + properties.value). APIM treats the spec as authoritative during import and re-derives serviceUrl from the spec's servers[0].url / host + basePath, silently discarding the override.

alignActiveRevisionWithSource() does a metadata-only re-PUT, but only fires when the API has additional revisions and is marked isCurrent, so single-revision APIs never had their overrides re-asserted.

Symptom
Given an overrides file:

apis:
- name: swagger-petstore
properties:
serviceUrl: https://prod-petstore.example.com

and a source folder that contains both swagger-petstore/apiInformation.json and swagger-petstore/specification.yaml, running:

apiops publish --source ./artifacts --overrides ./overrides.yaml ...

Expected: destination APIM Backend → HTTP(s) endpoint = https://prod-petstore.example.com

Actual: The override is silently ignored.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.