[英]Orocommerce - generate API client libraries
我是 orocommerce 生態系統的新手,我想為 orocommerce API(前端和后端)自動生成 API 客戶端庫。 目標是構建我自己的 UI。
我發現對 NelmioApiDocBundle 的一些依賴可能會生成 swagger 文件,但我遇到了多個問題:
symfony run php bin/console api:swagger:dump /tmp/api/
) seems not working with swagger codegen "as is"我想知道是否還有其他機制可以為 orocommerce 生成 API 客戶端庫。 我想要一個 typescript 的 SDK。
提前感謝您的回答。
正如您所說,目前唯一支持的 swagger 版本是 1.2。
By default, the api:swagger:dump
command works with an outdated API, to generate data for the current API, run it with --view=rest_json_api
option:
api:swagger:dump --view=rest_json_api
As an alternative to the API client generation, as Oro API strictly follows JSON.API standard, you can use many existing client libraries, compatible with the JSON.API specification. Typescript實現列表可以在官網找到: https://jsonapi.org/implementations/#client-libraries-typescript
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.