From 56b0d71b7a6cff039f75a805aff83d9b78f0bbf9 Mon Sep 17 00:00:00 2001 From: An Tran Date: Fri, 24 Jan 2025 11:06:37 +1000 Subject: [PATCH 1/2] [fapi] Fix wrong schema filename --- CHANGELOG.md | 1 + .../policy/fapi/{apicast-config.json => apicast-policy.json} | 0 2 files changed, 1 insertion(+) rename gateway/src/apicast/policy/fapi/{apicast-config.json => apicast-policy.json} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0826e486..255c7edd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed dns cache miss [PR #1500](https://github.com/3scale/APIcast/pull/1500) [THEESCALE-9301](https://issues.redhat.com/browse/THREESCALE-9301) - Fixed APIcast panic when parsing invalid base64 encoded value [PR #1505](https://github.com/3scale/APIcast/pull/1505) [THEESCALE-11435](https://issues.redhat.com/browse/THREESCALE-11435) - Remove "$id" from the policy schema [PR #1525](https://github.com/3scale/APIcast/pull/1525) [THEESCALE-11610](https://issues.redhat.com/browse/THREESCALE-11610) +- Fixed Financial-grade API (FAPI) policy not showing up in the admin portal [PR #1528](https://github.com/3scale/APIcast/pull/1528) [THREESCALE-11620](https://issues.redhat.com/browse/THREESCALE-11620) ### Added diff --git a/gateway/src/apicast/policy/fapi/apicast-config.json b/gateway/src/apicast/policy/fapi/apicast-policy.json similarity index 100% rename from gateway/src/apicast/policy/fapi/apicast-config.json rename to gateway/src/apicast/policy/fapi/apicast-policy.json From b8195d2b5264df6636bedcb3d91d3cf21fbeec16 Mon Sep 17 00:00:00 2001 From: An Tran Date: Fri, 24 Jan 2025 11:58:37 +1000 Subject: [PATCH 2/2] [fapi] fix failing unittest test --- spec/policy/fapi/fapi_spec.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/policy/fapi/fapi_spec.lua b/spec/policy/fapi/fapi_spec.lua index 6e91f39ba..e65ad4bfb 100644 --- a/spec/policy/fapi/fapi_spec.lua +++ b/spec/policy/fapi/fapi_spec.lua @@ -92,6 +92,7 @@ end) describe('fapi_1 advance profile', function() local context = {} + local ngx_req_headers = {} before_each(function() context = { jwt = {}, @@ -104,6 +105,8 @@ describe('fapi_1 advance profile', function() } ngx.header = {} + ngx_req_headers = {} + stub(ngx.req, 'get_headers', function() return ngx_req_headers end) stub(ngx, 'print') stub(ngx, 'exit') context.jwt = {}