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: Group API in core and extensions #23

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 56 additions & 37 deletions service/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,24 @@ info:
security:
- ApiKeyAuth: [ ]
- BearerAuth: [ ]
tags:
- name: OFREP Core
description: |
**Required**: Core APIs to implement to support OFREP.
*This is the minimum set of APIs required for a flag management system to be OFREP compatible.*
- name: OFREP Extensions
description: |
**Optional**: Extension APIs to provide full support for OFREP.
*These APIs are utilized by the providers to enhance the OFREP experience.*

paths:
/ofrep/v1/configuration:
get:
summary: OFREP provider configuration
description: OFREP configuration to provide information about the remote flag management system, to configure the OpenFeature SDK providers. This endpoint will be called during the initialization of the provider.
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/configurationResponse'
'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:
tags: [OFREP core]
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
summary: OFREP single flag evaluation contract
description: OFREP single flag evaluation request
description: |
OFREP single flag evaluation request.
The endpoint is called by the server providers to perform single flag evaluation.
parameters:
- name: key
in: path
Expand Down Expand Up @@ -105,8 +83,11 @@ paths:
$ref: '#/components/schemas/generalErrorResponse'
/ofrep/v1/evaluate/flags:
post:
tags: [OFREP core]
summary: OFREP bulk flag evaluation contract
description: OFREP bulk evaluation request
description: |
OFREP bulk evaluation request.
The endpoint is called by the client providers to perform single flag evaluation.
thomaspoignant marked this conversation as resolved.
Show resolved Hide resolved
parameters:
- in: header
name: If-None-Match
Expand Down Expand Up @@ -159,6 +140,44 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/generalErrorResponse'
/ofrep/v1/configuration:
get:
tags: [OFREP extensions]
summary: OFREP provider configuration
description: |
OFREP configuration is used to supply information about the remote flag management system and to set up the OpenFeature SDK providers.
The providers will contact this endpoint only if the client has opted in.
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/configurationResponse'
'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'
components:
securitySchemes:
BearerAuth:
Expand Down