Skip to content

fix: add minimumSoakTimeMinutes as optional alias in API contract #970

Description

@adityachoudhari26

Parent: #969

What

Add minimumSoakTimeMinutes as an optional field alongside the existing minimumSockTimeMinutes in the environment progression rule schema. This is the first step of a backwards-compatible rename.

The DB column is already correctly named (minimum_soak_time_minutes) — the typo only exists in the API layer.

Changes

OpenAPI specs — add optional alias field

  • apps/api/openapi/schemas/policies.jsonnet
  • apps/workspace-engine/oapi/spec/schemas/policy.jsonnet

Regenerate generated files

  • apps/api/openapi/openapi.json
  • apps/api/src/types/openapi.ts
  • apps/web/app/api/openapi.ts
  • apps/workspace-engine/oapi/openapi.json
  • apps/workspace-engine/pkg/oapi/oapi.gen.go
  • packages/workspace-engine-sdk/src/schema.ts
  • e2e/api/schema.ts

API route handlers — dual emit/accept

  • apps/api/src/routes/v1/workspaces/policies.ts — On read: emit both fields. On write: accept either (prefer new spelling).
  • packages/trpc/src/routes/policies.ts — Same dual-emit / accept-either logic.

Docs — note deprecation

  • docs/policies/overview.mdx
  • docs/policies/environment-progression.mdx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions