diff --git a/specification.json b/specification.json index eb3ed089..7ef1696f 100644 --- a/specification.json +++ b/specification.json @@ -294,6 +294,28 @@ "RFC 2119 keyword": "MUST", "children": [] }, + { + "id": "Requirement 2.1.2", + "machine_id": "requirement_2_1_2", + "content": "The provider `metadata` member or accessor MAY define an `allFlagKeys` field or accessor of type collection of strings, which identifies all available flag keys in the provider.", + "RFC 2119 keyword": "MAY", + "children": [] + }, + { + "id": "Condition 2.1.3", + "machine_id": "condition_2_1_3", + "content": "The implementing language has an asynchronous support.", + "RFC 2119 keyword": null, + "children": [ + { + "id": "Conditional Requirement 2.1.3.1", + "machine_id": "conditional_requirement_2_1_3_1", + "content": "The accessor for `allFlagKeys` SHOULD be asynchronous.", + "RFC 2119 keyword": "SHOULD", + "children": [] + } + ] + }, { "id": "Requirement 2.2.1", "machine_id": "requirement_2_2_1", diff --git a/specification/sections/02-providers.md b/specification/sections/02-providers.md index 0ff71b0d..748c4da1 100644 --- a/specification/sections/02-providers.md +++ b/specification/sections/02-providers.md @@ -26,6 +26,22 @@ Providers are the "translator" between the flag evaluation calls made in applica provider.getMetadata().getName(); // "my-custom-provider" ``` +#### Requirement 2.1.2 + +> The provider `metadata` member or accessor **MAY** define an `allFlagKeys` field or accessor of type collection of strings, which identifies all available flag keys in the provider. + +```typescript +provider.getMetadata().getAllFlagKeys(); // ['featureA', 'featureB'] +``` + +#### Condition 2.1.3 + +> The implementing language has an asynchronous support. + +##### Conditional Requirement 2.1.3.1 + +> The accessor for `allFlagKeys` **SHOULD** be asynchronous. + ### 2.2 Flag Value Resolution `Providers` are implementations of the `feature provider` interface, which may wrap vendor SDKs, REST API clients, or otherwise resolve flag values from the runtime environment. diff --git a/specification/types.md b/specification/types.md index e69f283d..61b13645 100644 --- a/specification/types.md +++ b/specification/types.md @@ -26,6 +26,10 @@ A numeric value of unspecified type or size. Implementation languages may furthe Structured data, presented however is idiomatic in the implementation language, such as JSON or YAML. +### Collection + +A list or series of similar data types, presented however is idiomatic in the implementation language. + ### Datetime A language primitive for representing a date and time, optionally including timezone information. If no timezone is specified, the date and time will be treated as UTC. @@ -124,6 +128,14 @@ A structure which supports definition of arbitrary properties, with keys of type This structure is populated by a provider for use by an [Application Author](./glossary.md#application-author) via the [Evaluation API](./glossary.md#evaluation-api) or an [Application Integrator](./glossary.md#application-integrator) via [hooks](./sections/04-hooks.md). +### Provider Metadata + +A structure which carries information about the provider. +In addition to the defined metadata fields below, arbitrary information can be stored here unique to the provider. + +`name` is a required key with a string value. +`allFlagKeys` is an optional key with a collection of string value. + ### Provider Status An enumeration of possible provider states.