Add dedicated OData API support (extract & publish)

Đang mở
#124 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
azure, typescript
Lĩnh vực
api, cli

Hướng nghiên cứu

Bắt đầu trong api-extractor.ts, api-publisher.ts và apim-client.ts, lần theo cách xử lý apiType hiện có và các luồng getExportFormat()/getImportFormat(). Kiểm tra tài liệu định dạng API của APIM hoặc hành vi hiện có của client để xác nhận các định dạng xuất và nhập OData/CSDL. Công việc được xem là hoàn tất khi các entity set và function OData vẫn tồn tại qua quá trình extract và publish, với các bài kiểm thử unit hoặc integration bao phủ cả hai luồng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Enhancement P2

Summary

apiops-cli currently handles OData APIs via the generic OpenAPI fallback path, which does not capture OData-specific artifacts. This issue tracks adding first-class OData support to both the extractor and publisher.

Background

Azure API Management added OData API support, but tooling across the ecosystem has lagged behind (see Azure/apiops#419). Users report that entity sets and functions are lost when extracting/publishing OData APIs.

Current behavior

  • Extractor (api-extractor.ts): No special-case handling for odata API type — it falls through to the generic openapi-link export, which misses OData-specific resources.
  • Publisher (api-publisher.ts): Recognizes odata as a valid apiType string but has no OData-specific import format or schema handling.
  • APIM Client (apim-client.ts): getExportFormat() returns 'openapi-link' for OData via the default case — no dedicated export format.

What needs to change

  1. Extract: Add OData-specific handling in api-extractor.ts to export CSDL schemas, entity sets, and functions via the appropriate APIM export format.
  2. APIM Client: Add an 'odata' case to getExportFormat() returning the correct APIM export format for OData APIs (investigate whether APIM supports a dedicated OData/CSDL export link).
  3. Publish: Add OData-specific import format handling in getImportFormat() so that CSDL schemas and entity sets are correctly imported on publish.
  4. Tests: Add unit/integration tests covering OData extract and publish flows.

Related

Ngôn ngữ chính
TypeScript
Star
29
Fork
10
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
22

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/apiops-cli

Tất cả issue của Azure/apiops-cli

Issue tương tự

Thêm issue về TypeScript

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.