Genrator seem does'nt work with custom API endpoints
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- php, typescript
Hướng nghiên cứu
Tái hiện lỗi bằng lệnh @api-platform/client-generator được cung cấp đối với endpoint Swagger/Hydra và kiểm tra URL docs.jsonld#Entrypoint/ads được đề cập trong lỗi. Theo dõi cách trình tạo TypeScript phân giải các endpoint API tùy chỉnh không có các thao tác GET item; công việc được hoàn thành khi quá trình tạo kết thúc và tạo ra các interface mong đợi cho endpoint tùy chỉnh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi
We want to generate TS interfaces from swagger.
15% of our API is made up of custom API endpoints who represent other ressources this isen't no related to entities.
Ts generator seem to be blocked on the first custom API endpoint.
Custom API endpoints are defined like this :
namespace App\SwaggerEndpoint;
use ApiPlatform\Core\Annotation\ApiResource;
/**
* @ApiResource(
* collectionOperations={
* "get": {
* "route_name": "app_v2_ads_getadbyid",
* "method": "GET",
* "openapi_context": {
* "summary": "Get ads webview",
* },
* },
* },
* itemOperations={}
* )
*/
class Ads
{
}

We execute that command :
NODE_TLS_REJECT_UNAUTHORIZED=0 npx @api-platform/client-generator --generator typescript https://xxxxxxxxx/ tsI/
This return :
Error: Unable to find the URL for "https://xxxxxxxxx/docs.jsonld#Entrypoint/ads", make sure your api resource has at least one GET item operation declared.
Is it possible to work around this problem ?
Best regards.
- Ngôn ngữ chính
- TypeScript
- Star
- 376
- Fork
- 132
- 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
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ự
-
triage
Độ 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
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jessepollak/home#1455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
lingdojo/kana-dojo#31227 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
appandflow/stim#1838 ·
Maintainer thường phản hồi trong vòng 1 ngày