-
Notifications
You must be signed in to change notification settings - Fork 55
feat(ws): automate generation of types and HTTP client layer from Swagger definitions #496
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
feat(ws): automate generation of types and HTTP client layer from Swagger definitions #496
Conversation
/hold |
e2b7fa6
to
c618837
Compare
c618837
to
93aca1b
Compare
/ok-to-test |
8b899f3
to
6a5462b
Compare
6a5462b
to
2b7ea5f
Compare
6a3b350
to
66ea18f
Compare
/unhold |
66ea18f
to
6a28b6a
Compare
…gger definitions Signed-off-by: Guilherme Caponetto <[email protected]>
6a28b6a
to
b9e7532
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.
/lgtm
Great work!!! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ederign The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
closes: #499
This pull request introduces significant changes to the frontend codebase, primarily focusing on updating API types to align with newly generated TypeScript definitions from a Swagger API specification. Additionally, it includes enhancements to error handling, dependency updates, and minor logic adjustments. The most important changes are grouped below by theme.
API Type Migration:
backendApiTypes
references withgenerated/data-contracts
throughout the codebase, updating type imports and usage for entities likeWorkspace
,WorkspaceState
,WorkspaceKind
, andValidationError
.mockNamespaces.ts
,workspace.mock.ts
, andworkspaceKinds.mock.ts
.Dependency Updates:
swagger-typescript-api
as a new dependency inworkspaces/frontend/package.json
to generate TypeScript API definitions.axios
as a dependency to facilitate API requests.Error Handling Enhancements:
ValidationErrorAlert
component to display both the error message and the associated field name.Code Logic Adjustments:
NamespaceContextProvider
to handle cases where the last used namespace is invalid or missing.Build and Development Improvements:
generate:api
inworkspaces/frontend/package.json
to automate the generation of TypeScript API definitions from the Swagger specification.