A basic OpenAPI spec for OpenFeature provider-compliant HTTP communication.
I called the resource /flags initially, but /flags/{flag-key}/resolve is a more technically correct path, because we're not actually creating a flag resource instance here, but performing an evaluation. I subscribe to the thinking here... Not sure if that feels too awkward. Another option would be /flag-resolutions/{flag-key}, which is arguably more RESTful.
The resource essentially just evaluates a flag given a flag-key (path param), default-value (query param), and optional context JSON object in body. It responds with an OpenFeature compliant JSON body representing an resolution details object
A basic OpenAPI spec for OpenFeature provider-compliant HTTP communication.
I called the resource
/flags
initially, but/flags/{flag-key}/resolve
is a more technically correct path, because we're not actually creating a flag resource instance here, but performing an evaluation. I subscribe to the thinking here... Not sure if that feels too awkward. Another option would be/flag-resolutions/{flag-key}
, which is arguably more RESTful.The resource essentially just evaluates a flag given a
flag-key
(path param),default-value
(query param), and optionalcontext
JSON object in body. It responds with an OpenFeature compliant JSON body representing an resolution details objectHere's a rendering in a swaggerUI: