OpenAPITools / OpenAPITools/openapi-diff

Output in text and markdown not equivalent (text output incomplete)

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

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

enhancement Render capabilities
Ngôn ngữ chính
Java
Star
1.1k
Fork
190
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The text output which is printed by default by the CLI doesn't show all the information that the markdown output shows:

spec1.yaml
components:
  schemas:
    SomeDTO:
      someProperty:
        type: string
        enum:
          - ENUM_VALUE_1
          - ENUM_VALUE_2
spec2.yaml
components:
  schemas:
    SomeDTO:
      someProperty:
        type: string
        enum:
          - ENUM_VALUE_1
          - ENUM_VALUE_2
          - ENUM_VALUE_3

markdown output
#### What's Changed
---

##### `GET` /resources1/{id}/resources2


###### Return Type:

Changed response : **200 OK**
> OK


* Changed content type : `application/json`

    Changed items (object):

    * Changed property `someProperty` (string)

        Added enum value:

        * `ENUM_VALUE_3`

text output
==========================================================================
==                            API CHANGE LOG                            ==
==========================================================================
             API for Umetrics Core Project Management Service             
--------------------------------------------------------------------------
--                            What's Changed                            --
--------------------------------------------------------------------------
  Return Type:
    - Changed 200 OK
      Media types:
        - Changed application/json
          Schema: Broken compatibility
- GET    /resources1/{id}/resources2
                 API changes broke backward compatibility                 
--------------------------------------------------------------------------

text output tells nothing about what actually broke backwards compatibility, but since it's the stdout of the process it should show everything that's needed to determine the reason of the problem.

Alternative solution: give an option to decide which kind of output: text/markdown/json should be printed to stdout.

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.

Hướng nghiên cứu

Bắt đầu với đường dẫn CLI tạo ra đầu ra văn bản được hiển thị và so sánh nó với markdown formatter. Sử dụng ví dụ spec1.yaml và spec2.yaml được cung cấp để xác minh rằng stdout xác định thuộc tính và giá trị enum đã thay đổi, hoặc có sẵn một tùy chọn định dạng đầu ra rõ ràng.

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

Đánh giá

Công nghệ
java, openapi
Lĩnh vực
api, cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

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.