Reputation: 101
I am quite new in the orocommerce ecosystem, and I would like to generate API client librairies automatically for orocommerce API (frontend and backend). The objective is to build my own UI.
I found some dependencies on NelmioApiDocBundle than could potentially generate swagger file, but I hit multiple problems:
symfony run php bin/console api:swagger:dump /tmp/api/
) seems not working with swagger codegen "as is"I am wondering if there is an other mechanism to generate API client librairies for orocommerce. I would like a SDK for typescript.
Thanks in advance for your answer.
Upvotes: 1
Views: 200
Reputation: 1956
Right now, the only supported swagger version is 1.2, as you stated.
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. The list of Typescript implementations can be found at the official website: https://jsonapi.org/implementations/#client-libraries-typescript
Upvotes: 1