OpenAPITools / OpenAPITools/openapi-generator-cli

[Feature Request] Add authentication options for the repository configuration of the openapitools.json

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

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

Ngôn ngữ chính
TypeScript
Star
2k
Fork
208
Merge trung bình
7 giờ 12 phút
Pull request đã merge (30 ngày)
6

Mô tả

Currently it is possible to specify downloadUrl and queryUrl in the repository configuration block if a private repository should be used:

{
    "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
    "spaces": 2,
    "generator-cli": {
        "version": "5.1.1",
        "storageDir": "./openapitools-download",
        "repository": {
            "queryUrl": "https://artifactory.mycorp.com/maven-central/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200",
            "downloadUrl": "https://artifactory.mycorp.com/maven-central/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar"
        }
    }
}

Unfortunately the artifact-storage of my organization requires login credentials and I can thus not use this option. It would be great if something like this could be added:

{
    "generator-cli": {
        "repository": {
            "queryUrl": "https://artifactory.mycorp.com/maven-central/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200",
            "downloadUrl": "https://artifactory.mycorp.com/maven-central/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar",
            "username":"",
            "password":"",
        }
    }
}

On a general note:
I think the documentation of these configuration options could be more extensive. I learned about the repository block via a comment on an issue as it is not in the README...

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 apps/generator-cli/src/README.md và apps/generator-cli/src/config.schema.json để hiểu các tùy chọn repository được ghi lại và được xác thực. Theo dõi cách xử lý cấu hình repository từ các điểm vào của package, sau đó xác định cách cung cấp thông tin xác thực một cách an toàn, hỗ trợ các yêu cầu query và download đã xác thực, đồng thời ghi lại cấu hình và cách sử dụng khi cả hai thao tác đều hoạt động với một repository riêng tư.

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

Đánh giá

Công nghệ
typescript
Lĩnh vực
authentication, cli, documentation
Loại issue
Tính năng
Độ 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
38/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.