graasp / graasp-auth

2 stars 2 forks source link

feat: generate api #465

Open pyphilia opened 2 months ago

pyphilia commented 2 months ago

This is a draft-test for api generation. How I can see it can work:

  1. 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.
  2. 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:

To investigate:

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud