Skip to content

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Jan 21, 2026

Summary

  • Add scripts/generate-strict-types.mjs to auto-generate src/types-strict.ts from openapi.json
  • Update generate-sdk.mjs to include strict type generation in the workflow
  • Strict types now stay in sync automatically when OpenAPI changes

RepositoryItem changes

Added (previously missing):

  • slug - Repository slug
  • description - Repository description
  • head_full_scan_id - ID of the head full scan
  • integration_meta - GitHub integration metadata (now properly nullable)
  • workspace - Repository workspace
  • slig - Legacy typo field for backwards compatibility

Removed (not in API response):

  • organization_id
  • organization_slug

ListRepositoriesOptions changes

Added:

  • include_archived - Filter to include archived repositories

Test plan

  • All existing tests pass
  • TypeScript type check passes
  • Full pnpm run generate-sdk workflow works end-to-end
  • Generated types match OpenAPI schema

@jdalton jdalton force-pushed the fix/generate-strict-types-from-openapi branch 7 times, most recently from 6bfd0fc to f4fa812 Compare January 21, 2026 23:25
Copy link
Contributor

@billxinli billxinli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a question regarding required values from the Open api spec file.

@jdalton jdalton force-pushed the fix/generate-strict-types-from-openapi branch from f40d313 to bc31734 Compare January 22, 2026 21:28
@jdalton jdalton force-pushed the fix/generate-strict-types-from-openapi branch 6 times, most recently from dceea49 to 4dc81f1 Compare January 23, 2026 02:08
@socket-security
Copy link

socket-security bot commented Jan 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​sveltejs/​acorn-typescript@​1.0.8971009389100

View full report

@socket-security-staging
Copy link

socket-security-staging bot commented Jan 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​sveltejs/​acorn-typescript@​1.0.8971009389100

View full report

@jdalton jdalton force-pushed the fix/generate-strict-types-from-openapi branch 2 times, most recently from 20df300 to 0569051 Compare January 23, 2026 02:15
- Add scripts/generate-strict-types.mjs to generate src/types-strict.ts
  from openapi.json instead of manual maintenance
- Update generate-sdk.mjs to run strict type generation after API types
- RepositoryItem now includes missing fields: slug, description,
  head_full_scan_id, integration_meta, workspace, slig
- ListRepositoriesOptions now includes include_archived
- Remove organization_id/organization_slug (not in API response)
- Types stay in sync automatically when OpenAPI changes

Fixes SMO-573
@jdalton jdalton force-pushed the fix/generate-strict-types-from-openapi branch from 0569051 to 3a628b3 Compare January 23, 2026 02:17
@jdalton jdalton merged commit dbcc8c5 into main Jan 23, 2026
8 checks passed
@jdalton jdalton deleted the fix/generate-strict-types-from-openapi branch January 23, 2026 02:19
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 this pull request may close these issues.

3 participants