Repository navigation
[dataprotection] Code generation: update services and models - #1773
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the SDK generation log for the dataprotection service and modifies the generated dataProtectionApi.ts file to import ServiceError and add void statements to bypass unused variable checks. The review feedback suggests improving the generator templates to merge duplicate imports, remove unused imports like ServiceError, and use idiomatic TypeScript import type statements for type-only references instead of using void statements.
| import { ServiceError } from "../../typings/dataProtection/models"; | ||
| import { SubjectErasureByPspReferenceRequest } from "../../typings/dataProtection/models"; | ||
| import { SubjectErasureResponse } from "../../typings/dataProtection/models"; | ||
| void ServiceError; | ||
| void SubjectErasureByPspReferenceRequest; | ||
| void SubjectErasureResponse; |
There was a problem hiding this comment.
The generated code imports multiple models from the same module using separate import statements and uses void statements to bypass unused variable checks.
- Duplicate Imports: Multiple imports from
../../typings/dataProtection/modelsshould be merged. - Unused Import:
ServiceErroris imported but never used in this file. - Type-Only Imports:
SubjectErasureByPspReferenceRequestandSubjectErasureResponseare only used as type annotations. Usingimport typeis the idiomatic TypeScript way to import type-only dependencies, which avoids triggering unused import warnings and prevents emitting unnecessaryvoidstatements in the compiled JavaScript.
Since this is generated code, please consider updating the generator templates to merge imports, omit unused models, and use import type for type-only references.
| import { ServiceError } from "../../typings/dataProtection/models"; | |
| import { SubjectErasureByPspReferenceRequest } from "../../typings/dataProtection/models"; | |
| import { SubjectErasureResponse } from "../../typings/dataProtection/models"; | |
| void ServiceError; | |
| void SubjectErasureByPspReferenceRequest; | |
| void SubjectErasureResponse; | |
| import type { SubjectErasureByPspReferenceRequest, SubjectErasureResponse } from "../../typings/dataProtection/models"; |
355d4b4 to
6a7e89a
Compare
This PR contains the automated changes for the
dataprotectionservice.The commit history of this PR reflects the
adyen-openapicommits that have been applied.