Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add metadata endpoint #9

Merged
merged 12 commits into from
Apr 19, 2024
65 changes: 65 additions & 0 deletions service/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,41 @@ security:
- ApiKeyAuth: [ ]
- BearerAuth: [ ]
paths:
/ofrep/v1/metadata:
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
get:
summary: OFREP metadata
description: OFREP metadata , it gives information about the remote flag management system, to configure the providers. This endpoint is called during the initialization of the provider.
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
parameters:
- in: header
name: If-None-Match
description: The request will be processed only if ETag doesn't match any of the values listed.
schema:
type: string
required: false
responses:
'200':
description: OFREP metadata response
headers:
ETag:
schema:
type: string
description: Entity tag used for cache validation
content:
application/json:
schema:
$ref: '#/components/schemas/metadataResponse'
'304':
description: Flag Management System Metadata is not modified
'401':
description: Unauthorized - You need credentials to access the API
'403':
description: Forbidden - You are not authorized to access the API
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/generalErrorResponse'
/ofrep/v1/evaluate/flags/{key}:
post:
description: OFREP single flag evaluation request
Expand Down Expand Up @@ -279,3 +314,33 @@ components:
errorDetails:
type: string
description: An error description for logging or other needs
metadataResponse:
description: OFREP metadata response
properties:
name:
type: string
description: name of the flag management system
examples:
- flagd
- go-feature-flag
features:
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
type: object
description: List of the features supported by the flag management system.
properties:
cacheInvalidation:
type: array
enum: [POLLING]
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
description: list of the cache invalidation mechanisme supported by the flag management system.
examples:
- [POLLING]
configurations:
type: object
description: Configuration of the providers specific for the flag management system.
properties:
minPollingInterval:
type: number
description: minimum polling interval (in millisecond) supported by the flag management system. The provider should ensure not to set any polling value under this minimum.
examples:
- 60000
required:
- name