Introduce check concept from "Azure/openapi-diff" project

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

Maintainer thường phản hồi trong vòng 5 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
openapi
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng việc đọc tài liệu Azure/openapi-diff và các test openapi-diff/src/modeler/AutoRest.Swagger.Tests/Resource/Swagger của nó, sau đó so sánh các kiểm tra mà chúng báo cáo với hành vi so sánh hiện tại của dự án này. Issue không nêu tên các tệp cục bộ hoặc một entry point; để hoàn thành sẽ cần thống nhất phạm vi tích hợp và các kiểm tra tương ứng.

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

Mô tả

enhancement

The project Azure/openapi-diff produce following output when two versions of a spec are compared: a list of items (error, warning, info) is computed.

Example:

$ oad compare old/added_path.json new/added_path.json
{
  "id": "1001",
  "code": "NoVersionChange",
  "message": "The versions have not changed.",
  "jsonref": "#",
  "json-path": "#",
  "type": "Info"
}
{
  "id": "1039",
  "code": "AddedOperation",
  "message": "The new version is adding an operation that was not found in the old version.",
  "jsonref": "#/paths/~1api~1Operations/post",
  "json-path": "#/paths/api/Operations/post",
  "type": "Info"
}
{
  "id": "1038",
  "code": "AddedPath",
  "message": "The new version is adding a path that was not found in the old version.",
  "jsonref": "#/paths/~1api~1Paths",
  "json-path": "#/paths/api/Paths",
  "type": "Info"
}

The list of rules that are currently checked can be found in their git repository: docs
I had a look at their test suite in this folder: Swagger

To run their the oad tool against it, I had to perform some changes: https://github.com/Azure/openapi-diff/pull/108
Then I have converted the old Swagger 2.0 format to OpenAPI 3.0.1 format.

Of course, I will share my work.
We can then continue the discussion and see how this could be integrated.

Ngôn ngữ chính
Java
Star
1.1k
Fork
191
Merge trung bình
4 ngày 23 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

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 OpenAPITools/openapi-diff

Tất cả issue của OpenAPITools/openapi-diff

Issue tương tự

Thêm issue về Java

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.