From 2e49ef771710e20d26cd0750f3f4011a49798831 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Fri, 7 Jun 2024 18:26:07 +0200 Subject: [PATCH 1/5] feat: Group API in core and extensions Signed-off-by: Thomas Poignant --- service/openapi.yaml | 83 ++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/service/openapi.yaml b/service/openapi.yaml index 0c34714..160aa26 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -14,45 +14,13 @@ security: - ApiKeyAuth: [ ] - BearerAuth: [ ] 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] 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 @@ -105,8 +73,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. parameters: - in: header name: If-None-Match @@ -159,6 +130,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: From dcccacf060b8df37c3f00fd7cbad4362dfe18f57 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Fri, 7 Jun 2024 18:42:13 +0200 Subject: [PATCH 2/5] fix typo Signed-off-by: Thomas Poignant --- service/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/openapi.yaml b/service/openapi.yaml index 160aa26..a513e60 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -77,7 +77,7 @@ paths: summary: OFREP bulk flag evaluation contract description: | OFREP bulk evaluation request. - The endpoint is called by the client providers to perform single flag evaluation. + The endpoint is called by the client providers to perform bulk flag evaluation. parameters: - in: header name: If-None-Match From 4b53a583c122b76b888f9e7f6672090e596e942e Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Fri, 7 Jun 2024 22:02:21 +0200 Subject: [PATCH 3/5] Add tags description Signed-off-by: Thomas Poignant --- service/openapi.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/service/openapi.yaml b/service/openapi.yaml index a513e60..d29cbeb 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -13,6 +13,21 @@ info: security: - ApiKeyAuth: [ ] - BearerAuth: [ ] +tags: + - name: OFREP core + description: | + Core APIs to implement to support OFREP. + **Required** + + *This is the minimum set of APIs required for a flag management system to be OFREP compatible.* + + - name: OFREP extensions + description: | + Extension APIs to provide full support for OFREP. + **Optional** + + *These APIs are utilized by the providers to enhance the OFREP experience.* + paths: /ofrep/v1/evaluate/flags/{key}: post: @@ -77,7 +92,7 @@ paths: summary: OFREP bulk flag evaluation contract description: | OFREP bulk evaluation request. - The endpoint is called by the client providers to perform bulk flag evaluation. + The endpoint is called by the client providers to perform single flag evaluation. parameters: - in: header name: If-None-Match From 9bb07fe06d45f7757fc1767695daa7bb5544e839 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Mon, 10 Jun 2024 09:20:54 +0200 Subject: [PATCH 4/5] feat!: change minPollingInterval field name to mention millisecond (#25) * feat!: change minPollingInterval field name to mention millisecond Signed-off-by: Thomas Poignant * change name to ms Signed-off-by: Thomas Poignant --------- Signed-off-by: Thomas Poignant --- service/openapi.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/service/openapi.yaml b/service/openapi.yaml index d29cbeb..284bb15 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -384,9 +384,11 @@ components: enabled: type: boolean description: set to true if the remote flag management system is supporting polling - minPollingInterval: + minPollingIntervalMs: 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. + 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: From 90c99f8c8cd2ca41b34c3574f1cb52d393b3dee3 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Mon, 10 Jun 2024 09:26:08 +0200 Subject: [PATCH 5/5] Update service/openapi.yaml Co-authored-by: Kavindu Dodanduwa Signed-off-by: Thomas Poignant Signed-off-by: Thomas Poignant --- service/openapi.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/service/openapi.yaml b/service/openapi.yaml index 284bb15..448d267 100644 --- a/service/openapi.yaml +++ b/service/openapi.yaml @@ -14,18 +14,13 @@ security: - ApiKeyAuth: [ ] - BearerAuth: [ ] tags: - - name: OFREP core + - name: OFREP Core description: | - Core APIs to implement to support OFREP. - **Required** - + **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 + - name: OFREP Extensions description: | - Extension APIs to provide full support for OFREP. - **Optional** - + **Optional**: Extension APIs to provide full support for OFREP. *These APIs are utilized by the providers to enhance the OFREP experience.* paths: