Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

feat: generate api #465

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: generate api #465

wants to merge 1 commit into from

Conversation

pyphilia
Copy link
Contributor

@pyphilia pyphilia commented Oct 4, 2024

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:

  • improve schema: add error types (currently result to unknown)

To investigate:

  • generate cypress server?

@pyphilia pyphilia self-assigned this Oct 4, 2024
Copy link

sonarqubecloud bot commented Oct 4, 2024

email: lowercaseEmail,
captcha: token,
url: redirect.url,
body: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to encapsulate in body, I think it's good as it is clear why the props are used.

@pyphilia pyphilia requested review from spaenleh and ReidyT October 4, 2024 13:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant