[REL-10407] [Flag status tools] Updating OAS to consider FlagStatuses.LastRequested as nullable. #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
FeatureFlagStatustype and related schemas to allowlastRequestedto benull, improving flexibility when this timestamp is absent. [1] [2] [3]lastRequestedas nullable in the API schemas (schemas/openapi.jsonandschemas/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:

after:

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