Skip to content
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

Duplicate identifier 'id' in job schema #1608

Closed
Junjiequan opened this issue Jan 7, 2025 · 0 comments · Fixed by #1641
Closed

Duplicate identifier 'id' in job schema #1608

Junjiequan opened this issue Jan 7, 2025 · 0 comments · Fixed by #1641
Assignees

Comments

@Junjiequan
Copy link
Member

Junjiequan commented Jan 7, 2025

Summary

The SDK publish process fails with a TS2300: Duplicate identifier 'id' error during the npm run build step. This issue occurs in the JobClass model where id and _id are both defined, leading to conflicts. Additionally, TypeScript reports TS1117: An object literal cannot have multiple properties with the same name.

image

Proposed Solution

Follow the dataset schema where id is named pid to avoid duplicate identifiers. For the id in the job schema, we can rename it to jobId.

Details

  • Mongoose or another library may be auto-generating an id field as a virtual alias for _id, causing TypeScript to detect duplicate identifiers.

  • The JobClass model explicitly defines both id and _id, which further exacerbates the conflict.

martin-trajanovski added a commit that referenced this issue Jan 20, 2025
@martin-trajanovski martin-trajanovski self-assigned this Jan 20, 2025
@martin-trajanovski martin-trajanovski linked a pull request Jan 20, 2025 that will close this issue
4 tasks
martin-trajanovski added a commit that referenced this issue Jan 21, 2025
* fix: issue #1608 sdk generation

* use the configuration json files instead of directly passing the config properties
Junjiequan pushed a commit that referenced this issue Jan 22, 2025
* fix: issue #1608 sdk generation

* use the configuration json files instead of directly passing the config properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants