Genrator seem does'nt work with custom API endpoints
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- php, typescript
调研方向
使用提供的 @api-platform/client-generator 命令针对 Swagger/Hydra 端点重现该失败,并检查错误中提到的 docs.jsonld#Entrypoint/ads URL。跟踪 TypeScript 生成器如何解析没有 GET 项操作的自定义 API 端点;完成标准是生成过程完成,并为自定义端点生成预期的接口。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 376
- 派生
- 132
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
api-platform/create-client 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
api-platform/create-client#396 ·
-
[potential Security Alert] New `test-nuxt-app` script added in `@api-platform/[email protected]`未关闭
难度 4/5 3-5 天 新手友好度 38/100
api-platform/create-client#397 ·
-
[potential Security Alert] New `test-next-app` script added in `@api-platform/[email protected]`未关闭
难度 3/5 1-2 天 新手友好度 45/100
api-platform/create-client#395 ·
-
[potential Security Alert] New `test-react-app` script added in `@api-platform/[email protected]`未关闭
难度 4/5 3-5 天 新手友好度 35/100
api-platform/create-client#394 ·
-
难度 4/5 3-5 天 新手友好度 25/100
api-platform/create-client#393 · 1 条评论 ·
查看 api-platform/create-client 的全部 Issue
相似的 Issue
-
priority: P2
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 65/100
prime-radiant-inc/evener#3291 ·
维护者通常 1 天内回复
-
accessibility bug revealjs
难度 2/5 1-3 小时 新手友好度 84/100
quarto-dev/quarto-cli#14961 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
supabase/agent-skills#614 ·
-
Content
难度 2/5 1-3 小时 新手友好度 68/100
RunestoneInteractive/rs#1559 · 1 条评论 ·
维护者通常 2 天内回复