Skip to content

chore: sync OpenAPI spec with latest production spec#667

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1774356814-openapi-spec-update
Open

chore: sync OpenAPI spec with latest production spec#667
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1774356814-openapi-spec-update

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 24, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Closing the spec drift identified in the CLI-vs-Gonfalon gap analysis. The CLI's bundled ld-openapi.json was behind the current production spec by 6 operations.

Describe the solution you've provided

Ran make openapi-spec-update to download the latest spec from https://app.launchdarkly.com/api/v2/openapi.json and regenerate cmd/resources/resource_cmds.go.

New CLI commands generated (6):

Command Method Path Resource Group
get-observability-metrics-usage GET /api/v2/usage/observability/metrics Account usage (beta)
get-sdk-versions-details GET /api/v2/usage/sdk-versions/details Account usage (beta)
get-vega-ai-usage GET /api/v2/usage/vega-ai Account usage (beta)
create-prompt-snippet POST /api/v2/projects/{projectKey}/ai-configs/prompt-snippets AI Configs
create-entry-counts POST /api/v2/auditlog/counts Audit log
get-experiments-any-env GET /api/v2/projects/{projectKey}/experiments Experiments

Other spec changes pulled in:

  • Service connections usage endpoint gained a new sdk-app-id query param and sdkAppId group-by dimension
  • Environments: descriptions updated to reference resourceApprovalSettings alongside approvalSettings
  • Views: version field renamed to _version, maintainer object added to segment schemas
  • Removed ExpandedLinkedResourcesAIConfigs and ExpandedLinkedResourcesMetrics schemas
  • Removed metricRegressionThreshold from measured rollout examples

⚠️ Items for reviewer attention:

  1. Schema removalsExpandedLinkedResourcesAIConfigs, ExpandedLinkedResourcesMetrics, and metricRegressionThreshold were removed from the production spec. These are spec-only (the CLI uses the spec for command generation, not schema validation), but worth confirming these removals are intentional upstream.
  2. resource_cmds.go is fully auto-generated — changes there should match the spec 1:1; no manual edits were made.
  3. sdk-active endpoint is NOT included — it is only in the hidden spec (ld-openapi-hidden.json) and the public spec endpoint (/api/v2/openapi.json) does not serve it. A separate change would be needed to add it to the CLI.

Describe alternatives you've considered

N/A — this is the standard spec sync workflow via make openapi-spec-update.

Additional context

All existing tests pass (make test). Total operation count: 345 → 351.

Link to Devin session: https://app.devin.ai/sessions/8951a04e5c5f46b1915e5d00a281914e


Note

Medium Risk
Primarily auto-generated command metadata updates, but it expands the CLI surface area (new commands/params) and tweaks existing endpoint docs, which can impact users’ scripts and expectations.

Overview
Syncs the generated CLI command definitions in cmd/resources/resource_cmds.go with the latest production OpenAPI spec.

Adds 6 new operations, including new account-usage endpoints (observability metrics, SDK version details, Vega AI), an AI config prompt-snippet create endpoint, an audit-log counts endpoint, and a project-wide experiments listing endpoint.

Updates several existing commands’ parameters and docs (for example adding sdk-app-id/sdkAppId grouping for service connections usage, expanding experiment docs and analysisConfig expansion, and refining views/metrics filtering and descriptions).

Written by Cursor Bugbot for commit c94b895. This will update automatically on new commits. Configure here.

Downloads latest spec from https://app.launchdarkly.com/api/v2/openapi.json
and regenerates cmd/resources/resource_cmds.go.

New operations added (6):
- POST /api/v2/projects/{projectKey}/ai-configs/prompt-snippets (postPromptSnippet)
- GET /api/v2/projects/{projectKey}/experiments (getExperimentsAnyEnv)
- POST /api/v2/auditlog/counts (postAuditLogEntryCounts)
- GET /api/v2/usage/observability/metrics (getObservabilityMetricsUsage)
- GET /api/v2/usage/sdk-versions/details (getSdkVersionsDetails)
- GET /api/v2/usage/vega-ai (getVegaAIUsage)

Total operations: 345 -> 351

Co-Authored-By: Ari Salem <asalem@launchdarkly.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: Ari Salem <asalem@launchdarkly.com>
Copy link

@ari-launchdarkly ari-launchdarkly left a comment

Choose a reason for hiding this comment

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

I'm gonna talk to Devin about why the resource_cmds was updated

Copy link

@ari-launchdarkly ari-launchdarkly left a comment

Choose a reason for hiding this comment

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

Ok, I verified that these two are in fact just autogenerated after running the make openapi-spec-update command

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.

1 participant