Problem when generating Typescript interface from a fresh dev-main APIP core
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
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
Hướng nghiên cứu
Tái hiện vấn đề với @api-platform/client-generator bằng lệnh và https://api.calico.dev được hiển thị ở đây, sau đó so sánh với API demo. Bắt đầu bằng cách theo dõi cách trình tạo xử lý phản hồi từ /contexts/Entrypoint, đặc biệt là mảng do curl trả về. Công việc được coi là hoàn tất khi API được báo cáo có thể tạo các interface TypeScript hoặc công cụ báo lỗi rõ ràng và có thể xử lý được.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
API Platform version(s) affected: dev-main (v3)
Description
I try to generate typescript interfaces from client-generator tool it work sfind with the demo https://demo.api-platform.com/ but not with my personal instance but I can't make sense of the error message, any heap ?
node ➜ /srv/app/front $ npm run generate-types
> [email protected] generate-types
> NODE_TLS_REJECT_UNAUTHORIZED=0 npx @api-platform/client-generator --generator typescript https://api.calico.dev types/generated/ --resource Book
{
api: Api { entrypoint: 'https://api.calico.dev', resources: [] },
error: jsonld.InvalidUrl: Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.
at ContextResolver._fetchContext (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/ContextResolver.js:186:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ContextResolver._resolveRemoteContext (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/ContextResolver.js:117:34)
at async ContextResolver.resolve (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/ContextResolver.js:50:22)
at async api.process (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/context.js:65:20)
at async api.expand (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/expand.js:211:17)
at async Function.jsonld.expand (/home/node/.npm/_npx/5feb941c1afcc05f/node_modules/jsonld/lib/jsonld.js:331:18)
at async Promise.all (index 1) {
details: {
code: 'invalid remote context',
url: 'https://api.calico.dev/contexts/Entrypoint'
}
},
response: undefined,
status: undefined
}
node ➜ /srv/app/front $ curl https://api.calico.dev/contexts/Entrypoint
[{"@vocab":"https:\/\/api.calico.dev\/docs.jsonld#","hydra":"http:\/\/www.w3.org\/ns\/hydra\/core#","book":{"@id":"Entrypoint\/book","@type":"@id"}}]
- Ngôn ngữ chính
- TypeScript
- Star
- 376
- Fork
- 133
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 api-platform/create-client
-
[potential Security Alert] New `test-vue-app` script added in `@api-platform/[email protected]`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
api-platform/create-client#396 ·
-
[potential Security Alert] New `test-nuxt-app` script added in `@api-platform/[email protected]`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
api-platform/create-client#397 ·
-
[potential Security Alert] New `test-next-app` script added in `@api-platform/[email protected]`Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
api-platform/create-client#395 ·
-
[potential Security Alert] New `test-react-app` script added in `@api-platform/[email protected]`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
api-platform/create-client#394 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
api-platform/create-client#393 · 1 bình luận ·
Tất cả issue của api-platform/create-client
Issue tương tự
-
A hung CI job runs for 6 hours before it is cancelledCó thể đã có người làm @Olanetsoft đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Olanetsoft/agent-lookout#110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
thedotmack/claude-mem#4757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 bug 🗺️ MCP OAuth
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
LibreChat-AI/LibreChat#17077 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100