[BUG] openapi-generator-cli fails silently when it cannot create openapitools.json
@kay-schecker đang làm issue này rồi.
Từ ngày 18/6/2021.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
🐛 Bug Report:
Describe the bug
openapi-generator-cli fails silently when it cannot create openapitools.json
Steps to Reproduce
Steps to reproduce the behavior:
~/openapi-test
❯ node --version
v12.15.0
~/openapi-test
❯ npm --version
6.13.4
~/openapi-test
❯ java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
❯ npm install @openapitools/openapi-generator-cli@2.3.5
...
~/openapi-test
❯ cat swagger.yaml
swagger: "2.0"
info:
version: v1
title: Our API
description: The REST API for interacting with Our API
host: localhost:1234
schemes:
- http
paths:
"/api/job/{jobid}/status":
get:
summary: getJobStatus
description: Get the current status for a job.
operationId: getJobStatus
produces:
- application/json;charset=utf-8
parameters:
- required: true
in: path
name: jobid
type: string
responses:
"200":
schema:
$ref: "#/definitions/JobStatus"
description: ""
"404":
description: "`jobid` not found"
definitions:
JobStatus:
type: string
~/openapi-test
❯ $(npm bin)/openapi-generator-cli generate -i swagger.yaml --generator-name typescript-fetch
...
~/openapi-test
❯ ls apis/
DefaultApi.ts index.ts
~/openapi-test
❯ mkdir readonly
~/openapi-test
❯ chmod u-w readonly
~/openapi-test
❯ cd readonly
~/openapi-test/readonly
❯ touch test
touch: cannot touch 'test': Permission denied
~/openapi-test/readonly
❯ $(npm bin)/openapi-generator-cli generate -i ../swagger.yaml --generator-name typescript-fetch --output ..
~/openapi-test/readonly
❯ echo $?
1
~/openapi-test/readonly
❯ chmod u+w .
~/openapi-test/readonly
❯ cp ../openapitools.json .
~/openapi-test/readonly
❯ ls
openapitools.json
~/openapi-test/readonly
❯ chmod u-w .
~/openapi-test/readonly
❯ $(npm bin)/openapi-generator-cli generate -i ../swagger.yaml --generator-name typescript-fetch --output ..
... (works)
Expected behavior
The command prints an explanation of why the command is failing, or any next steps on how to debug
Operation System (please complete the following information):
- OS: Ubuntu 18 LTS
Package System (please complete the following information):
See reproduction for versions
Additional context
This cost me many, many hours of debugging because it only occurred in CI where volumes with no writes expected are mounted readonly, and during local testing we tend to already have an openapitools.json
- 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
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenAPITools/openapi-generator-cli
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependencies Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug
OpenAPITools/openapi-generator-cli#1213 · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1190 · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1138 · 1 bình luận · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1094 · 1 bình luận · 1 người được giao ·
Tất cả issue của OpenAPITools/openapi-generator-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TanStack/tanstack.com#1293 ·