This is a draft-test for api generation. How I can see it can work:
yarn openapi-ts will generate src/client with api and types. It uses a link/path from openapi-ts.config.ts. This link could be api.graasp.org/docs/json, or probably localhost:3000/docs/json. If you really want it could be a static file. src/client would be git-ignored.
On test and build, run openapi-ts to get the client. I used it on a partial schema, so it was quick. I hope it stays quick.
I think @graasp/query-client should provide the config, because it can be tweak with templates to get exactly what we need.
Needed steps detected:
[ ] improve schema: add error types (currently result to unknown)
This is a draft-test for api generation. How I can see it can work:
yarn openapi-ts
will generatesrc/client
with api and types. It uses a link/path fromopenapi-ts.config.ts
. This link could beapi.graasp.org/docs/json
, or probablylocalhost:3000/docs/json
. If you really want it could be a static file.src/client
would be git-ignored.openapi-ts
to get the client. I used it on a partial schema, so it was quick. I hope it stays quick.I think @graasp/query-client should provide the config, because it can be tweak with templates to get exactly what we need.
Needed steps detected:
To investigate: