Repository navigation
[capital] Code generation: update services and models - #1765
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the auto-generated SDK files for the capital service, including metadata updates and the addition of void statements to bypass TypeScript's unused local variable checks. The review feedback correctly identifies that DefaultErrorResponseEntity is imported and referenced with a void statement across multiple API classes without actually being used. This pattern bypasses compiler checks but leaves dead imports in the compiled output, which hinders tree-shaking and increases bundle size. It is recommended to update the generator templates to only import and emit void statements for models that are actively referenced.
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | ||
| import { FinancingType } from "../../typings/capital/models"; | ||
| import { GetDynamicOffersResponse } from "../../typings/capital/models"; | ||
| import { GrantOffer } from "../../typings/capital/models"; | ||
| void CalculateGrantOfferRequest; | ||
| void CalculatedGrantOffer; | ||
| void CreateGrantOfferRequest; | ||
| void DefaultErrorResponseEntity; | ||
| void FinancingType; | ||
| void GetDynamicOffersResponse; | ||
| void GrantOffer; |
There was a problem hiding this comment.
The DefaultErrorResponseEntity model is imported and referenced with a void statement, but it is never actually used in this API class. This pattern bypasses TypeScript's noUnusedLocals check but leaves dead imports in the compiled JavaScript, which prevents effective tree-shaking and increases bundle size.
Since this code is auto-generated, the OpenAPI Generator templates should be updated to only import and emit void statements for models that are actually referenced in the API methods.
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | |
| import { FinancingType } from "../../typings/capital/models"; | |
| import { GetDynamicOffersResponse } from "../../typings/capital/models"; | |
| import { GrantOffer } from "../../typings/capital/models"; | |
| void CalculateGrantOfferRequest; | |
| void CalculatedGrantOffer; | |
| void CreateGrantOfferRequest; | |
| void DefaultErrorResponseEntity; | |
| void FinancingType; | |
| void GetDynamicOffersResponse; | |
| void GrantOffer; | |
| import { FinancingType } from "../../typings/capital/models"; | |
| import { GetDynamicOffersResponse } from "../../typings/capital/models"; | |
| import { GrantOffer } from "../../typings/capital/models"; | |
| void CalculateGrantOfferRequest; | |
| void CalculatedGrantOffer; | |
| void CreateGrantOfferRequest; | |
| void FinancingType; | |
| void GetDynamicOffersResponse; | |
| void GrantOffer; |
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | ||
| import { GrantAccount } from "../../typings/capital/models"; | ||
| void DefaultErrorResponseEntity; | ||
| void GrantAccount; |
There was a problem hiding this comment.
The DefaultErrorResponseEntity model is imported and referenced with a void statement, but it is never actually used in this API class. This pattern bypasses TypeScript's noUnusedLocals check but leaves dead imports in the compiled JavaScript, which prevents effective tree-shaking and increases bundle size.
Since this code is auto-generated, the OpenAPI Generator templates should be updated to only import and emit void statements for models that are actually referenced in the API methods.
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | |
| import { GrantAccount } from "../../typings/capital/models"; | |
| void DefaultErrorResponseEntity; | |
| void GrantAccount; | |
| import { GrantAccount } from "../../typings/capital/models"; | |
| void GrantAccount; |
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | ||
| import { GrantOffer } from "../../typings/capital/models"; | ||
| import { GrantOffers } from "../../typings/capital/models"; | ||
| void DefaultErrorResponseEntity; | ||
| void GrantOffer; | ||
| void GrantOffers; |
There was a problem hiding this comment.
The DefaultErrorResponseEntity model is imported and referenced with a void statement, but it is never actually used in this API class. This pattern bypasses TypeScript's noUnusedLocals check but leaves dead imports in the compiled JavaScript, which prevents effective tree-shaking and increases bundle size.
Since this code is auto-generated, the OpenAPI Generator templates should be updated to only import and emit void statements for models that are actually referenced in the API methods.
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | |
| import { GrantOffer } from "../../typings/capital/models"; | |
| import { GrantOffers } from "../../typings/capital/models"; | |
| void DefaultErrorResponseEntity; | |
| void GrantOffer; | |
| void GrantOffers; | |
| import { GrantOffer } from "../../typings/capital/models"; | |
| import { GrantOffers } from "../../typings/capital/models"; | |
| void GrantOffer; | |
| void GrantOffers; |
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | ||
| import { Disbursement } from "../../typings/capital/models"; | ||
| import { DisbursementInfoUpdate } from "../../typings/capital/models"; | ||
| import { Disbursements } from "../../typings/capital/models"; | ||
| import { Grant } from "../../typings/capital/models"; | ||
| import { GrantInfo } from "../../typings/capital/models"; | ||
| import { Grants } from "../../typings/capital/models"; | ||
| void DefaultErrorResponseEntity; | ||
| void Disbursement; | ||
| void DisbursementInfoUpdate; | ||
| void Disbursements; | ||
| void Grant; | ||
| void GrantInfo; | ||
| void Grants; |
There was a problem hiding this comment.
The DefaultErrorResponseEntity model is imported and referenced with a void statement, but it is never actually used in this API class. This pattern bypasses TypeScript's noUnusedLocals check but leaves dead imports in the compiled JavaScript, which prevents effective tree-shaking and increases bundle size.
Since this code is auto-generated, the OpenAPI Generator templates should be updated to only import and emit void statements for models that are actually referenced in the API methods.
| import { DefaultErrorResponseEntity } from "../../typings/capital/models"; | |
| import { Disbursement } from "../../typings/capital/models"; | |
| import { DisbursementInfoUpdate } from "../../typings/capital/models"; | |
| import { Disbursements } from "../../typings/capital/models"; | |
| import { Grant } from "../../typings/capital/models"; | |
| import { GrantInfo } from "../../typings/capital/models"; | |
| import { Grants } from "../../typings/capital/models"; | |
| void DefaultErrorResponseEntity; | |
| void Disbursement; | |
| void DisbursementInfoUpdate; | |
| void Disbursements; | |
| void Grant; | |
| void GrantInfo; | |
| void Grants; | |
| import { Disbursement } from "../../typings/capital/models"; | |
| import { DisbursementInfoUpdate } from "../../typings/capital/models"; | |
| import { Disbursements } from "../../typings/capital/models"; | |
| import { Grant } from "../../typings/capital/models"; | |
| import { GrantInfo } from "../../typings/capital/models"; | |
| import { Grants } from "../../typings/capital/models"; | |
| void Disbursement; | |
| void DisbursementInfoUpdate; | |
| void Disbursements; | |
| void Grant; | |
| void GrantInfo; | |
| void Grants; |
efe6844 to
6932065
Compare
This PR contains the automated changes for the
capitalservice.The commit history of this PR reflects the
adyen-openapicommits that have been applied.