Feature/gsk 1649 use openapi typescript generation tools instead of j2ts#1359
Merged
andreybavt merged 26 commits intomainfrom Sep 4, 2023
Conversation
GSK-1649 Use OpenAPI-> typescript generation tools instead of J2TS
Having OpenAPI in place we can rely on it in order to generate TS typings (and even whole API client) instead of J2TS |
…ration-tools-instead-of-j2ts
…escript-generation-tools-instead-of-j2ts' into feature/gsk-1649-use-openapi-typescript-generation-tools-instead-of-j2ts
…ration-tools-instead-of-j2ts
…lt github runner is slow
…escript-generation-tools-instead-of-j2ts' into feature/gsk-1649-use-openapi-typescript-generation-tools-instead-of-j2ts
Googleton
approved these changes
Aug 31, 2023
Contributor
Googleton
left a comment
There was a problem hiding this comment.
LGTM. I guess there isn't that much work on migrating, is it just replacing api to api-v2 calls ?
Co-authored-by: Googleton <hugo@giskard.ai>
Contributor
Author
yes, it's mostly about replacing DTOs generated by openapi instead of J2TS ones (like I did in |
…ration-tools-instead-of-j2ts
…ration-tools-instead-of-j2ts
…escript-generation-tools-instead-of-j2ts' into feature/gsk-1649-use-openapi-typescript-generation-tools-instead-of-j2ts
kevinmessiaen
approved these changes
Sep 4, 2023
…ration-tools-instead-of-j2ts # Conflicts: # frontend/src/api.ts
…ration-tools-instead-of-j2ts
|
Kudos, SonarCloud Quality Gate passed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Added the necessary infrastructure to generate a typescript client based on Giskard's OpenAPI specs
This new autogenerated API will eventually replace the old
api.ts, the advantages are:This PR doesn't replace the old
api.ts, but contains a few examples. We should remove oldapi.tsusage gradually.How to use:
There's a new gradle command to generate a web client:
./gradlew generateOpenApiClientThe generated code will be stored in
frontend/src/generatedthe new
generateOpenApiClienttask is already linked with the backend and frontend build, so simply running:./gradlew buildwill also do the necessary to generate the client
Example of use:
https://github.com/Giskard-AI/giskard/blob/c7652cb5eae7be13124e6af86ce9e82f61e41829/frontend/src/stores/main.ts#L95