Skip to content

Conversation

@nieblara
Copy link
Contributor

@nieblara nieblara commented Oct 28, 2025

Upon using the get_flag_statuses_across_environments tool was failing on Zod validation when calling the flag status API.

The issue: when requesting flag statuses across environments, the API returns null for lastRequested when a flag has never been evaluated, but our OpenAPI spec didn't mark this field as nullable.

We plan on fixing the OAS at the source, this change enables that tool to be used while we work that out.

FILES CHANGED schemas/openapi.json

Describe the solution you've provided
Feature flag status:

  • Updated the FeatureFlagStatus type and related schemas to allow lastRequested to be null, improving flexibility when this timestamp is absent. [1] [2] [3]
  • Marked lastRequested as nullable in the API schemas (schemas/openapi.json and schemas/output.json), ensuring the OpenAPI documentation accurately reflects possible values. [1] [2] [3] [4]

Describe alternatives you've considered

Ideally, we make it so that the OAS at the source is accurate so that clients generating types from the schema dont encounter these issues, but that requires some more work in Gonfalon that will take a bit.
See https://github.com/launchdarkly/gonfalon/pull/54762 for details

before:
Screenshot 2025-10-28 at 1 13 25 PM

after:
Screenshot 2025-10-28 at 1 14 47 PM


Related Jira issue: REL-10407: Fix API drift when fetching flag status across environments

@launchdarkly-upra launchdarkly-upra bot changed the title [Flag status tools] Updating OAS to consider FlagStatuses.LastRequested as nullable. [REL-10407] [Flag status tools] Updating OAS to consider FlagStatuses.LastRequested as nullable. Oct 28, 2025
Copy link
Member

@bwoskow-ld bwoskow-ld left a comment

Choose a reason for hiding this comment

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

Looks good to me.

We plan on fixing the OAS at the source

Thank you for making the change upstream!

@nieblara nieblara merged commit b2fe478 into main Oct 28, 2025
1 check passed
@nieblara nieblara deleted the REL-10407-temp-spec-override branch October 28, 2025 20:42
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