open-feature / open-feature/cli
chore(sync/openapi): align flag types with OpenFeature spec (add float)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 63
- Forks
- 22
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 19
Description
While working with the sync OpenAPI specification in openfeature/cli, I noticed an inconsistency regarding numeric flag types, specifically missing support for floating-point values.
Current OpenAPI definition
Both:
FlagDefaultValue.oneOf
https://github.com/open-feature/cli/blob/144eb0f0e3b2c53c9ae99e1d671259306fe474d0/api/v0/sync.yaml#L24-L28ManifestFlag.type.enum
https://github.com/open-feature/cli/blob/144eb0f0e3b2c53c9ae99e1d671259306fe474d0/api/v0/sync.yaml#L47
are missing a floating-point / number representation.
Why this is incorrect per OpenFeature spec
https://openfeature.dev/specification/sections/flag-evaluation/#conditional-requirement-1331
https://openfeature.dev/specification/types/#number
This clearly establishes that floating-point values are a first-class concept in OpenFeature.
Existing manifest schema already supports floats : the current v0 flag manifest JSON Schema already allows float flags: flag-manifest.json#L37
This creates a mismatch where:
- JSON Schema ✅ allows float flags
- Sync OpenAPI spec ❌ does not
Impact
Because floating-point is missing from the OpenAPI spec:
- Code generation for provider servers becomes incorrect or incomplete
Suggested fix
Add number (or float) to:
FlagDefaultValue.oneOfManifestFlag.type.enum
I’m happy to provide a PR once the expected direction is agreed upon. 👍
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced definitions in api/v0/sync.yaml, especially FlagDefaultValue.oneOf and ManifestFlag.type.enum, and compare them with schema/v0/flag-manifest.json and the OpenFeature number type. Done means the sync OpenAPI definition represents floating-point flags consistently in both locations and no longer conflicts with the existing manifest schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100