-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Auto-generate frontend API client #1547
Conversation
A Storybook preview is available for commit 94b93a3. |
a68d048
to
194dc7b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1547 +/- ##
==========================================
+ Coverage 78.36% 79.07% +0.71%
==========================================
Files 171 172 +1
Lines 5778 5764 -14
Branches 663 665 +2
==========================================
+ Hits 4528 4558 +30
+ Misses 1098 1052 -46
- Partials 152 154 +2 ☔ View full report in Codecov by Sentry. |
0ebef9d
to
d1fc1f2
Compare
The pull request does not conform to the conventional commit specification. Please ensure that your commit messages follow the spec: https://www.conventionalcommits.org/. This is the commit validation log:
Here are some examples of valid commit messages:
|
The generated OpenAPI client is not up to date with the latest changes in the OpenAPI specification. |
06b3a25
to
7942474
Compare
7942474
to
687ae50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this and applying the initial changes. There are still a few services that make http calls that we should iteratively migrate to the generated ones so that we have no http calls left in our own services. I have ignored all the template and generated stuff in this PR due to the huge amount of changes and because I assume the generation works as expected.
There are only a few comments, mostly about some minor improvements that would be great to apply before we merge this PR.
...ns-wrapper/create-sessions/create-readonly-session/create-readonly-session-dialog.stories.ts
Outdated
Show resolved
Hide resolved
687ae50
to
892fa21
Compare
892fa21
to
49b2db2
Compare
Quality Gate passedIssues Measures |
Instead of maintaining our own frontend library, auto-generate a client with the OpenAPI Generator.
A new target
make openapi
was added. It can be used to auto-generate the new client according to the generated backend OpenAPI specification. To simplify the function names, the operation IDs are derived from the backend function names.There are some issues with the generated code, e.g., anyOf relationships are not supported. However, we don't use them in many places and they can still be updated manually.
The main.js size has increased from 3.9MB to 4MB. This can be considered as irrelevant.
The
/api/v1/projects/{project_slug}/models/{model_slug}/modelsources/git/validate/path
route had to be moved to/api/v1/settings/modelsources/git/validate/path
. Due to API generation issues, it accepts a JSON dictionary instead of a string. It didn't use theproject_slug
andmodel_slug
and better fits to the general Git instances.In addition, tests for the Git instance routes were added.