Skip to content

Commit b5db95e

Browse files
authored
Merge pull request #131 from constantine2nd/develop
API Explorer II - make v6.0.0 the default version
2 parents 2d8ee2b + 24107ee commit b5db95e

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ VITE_OBP_API_HOST=https://apisandbox.openbankproject.com
77
VITE_OBP_API_PORTAL_HOST=https://apisandbox.openbankproject.com
88
####################################################################################
99

10-
VITE_OBP_API_VERSION=v5.1.0
10+
VITE_OBP_API_VERSION=v6.0.0
1111
#The default version of the root page, it has the default value `OBP+VITE_OBP_API_VERSION`
1212
#The format must follow standard+Version, e.g., OBPv5.1.0, BGv1, or BGv1.3.
13-
#VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0
13+
#VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv6.0.0
1414

1515
# API Manager
1616
VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com

Dockerfiles/Dockerfile_frontend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ RUN go build -v -o /usr/src/app/prestart
1818
FROM registry.access.redhat.com/ubi9/nginx-120
1919

2020
ENV VITE_OBP_LOGO_URL=https://static.openbankproject.com/images/obp_logo.png \
21-
VITE_OBP_API_VERSION='v5.1.0' \
21+
VITE_OBP_API_VERSION='v6.0.0' \
2222
VITE_OBP_LINKS_COLOR='#39455f' \
2323
VITE_OBP_HEADER_LINKS_COLOR='#52b165' \
2424
VITE_OBP_HEADER_LINKS_HOVER_COLOR='#39455f' \
2525
VITE_OBP_HEADER_LINKS_BACKGROUND_COLOR='#eef0f4' \
26-
VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0 \
26+
VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv6.0.0 \
2727
VITE_CHATBOT_ENABLED=false \
2828
VITE_SHOW_API_MANAGER_BUTTON=false
2929

server/services/OBPConsentsService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class OBPConsentsService {
7979
// I.e. give permission to Opey to do anything on behalf of the logged in user
8080

8181
// Get the Consents API client from the OBP SDK
82-
const client = await this.createUserConsentsClient(session, '/obp/v5.1.0/my/consents/IMPLICIT', 'POST')
82+
const client = await this.createUserConsentsClient(session, `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents/IMPLICIT`, 'POST')
8383
if (!client) {
8484
throw new Error('Could not create Consents API client')
8585
}
@@ -150,7 +150,7 @@ export default class OBPConsentsService {
150150
}
151151

152152
try {
153-
const response = await this._sendOBPRequest(`/obp/v5.1.0/user/current/consents/${consentId}`, 'GET', clientConfig)
153+
const response = await this._sendOBPRequest(`/obp/${process.env.VITE_OBP_API_VERSION}/user/current/consents/${consentId}`, 'GET', clientConfig)
154154

155155
session['opeyConfig'] = {
156156
authConfig: {
@@ -182,7 +182,7 @@ export default class OBPConsentsService {
182182

183183
// Get the Consents API client from the OBP SDK
184184
// The OBP SDK is messed up here, so we'll need to use Fetch until the SWAGGER WILL ACTUALLY WORK
185-
// const client = await this.createUserConsentsClient(session, '/obp/v5.1.0/my/consents/IMPLICIT', 'POST')
185+
// const client = await this.createUserConsentsClient(session, `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents/IMPLICIT`, 'POST')
186186
// if (!client) {
187187
// throw new Error('Could not create Consents API client')
188188
// }
@@ -197,8 +197,8 @@ export default class OBPConsentsService {
197197

198198
// We need to change this back to consent infos once OBP shows 'EXPIRED' in the status
199199
// Right now we have to check the JWT ourselves
200-
const consentInfosPath = '/obp/v5.1.0/my/consents'
201-
//const consentInfosPath = '/obp/v5.1.0/my/consent-infos'
200+
const consentInfosPath = `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents`
201+
//const consentInfosPath = `/obp/${process.env.VITE_OBP_API_VERSION}/my/consent-infos`
202202

203203
let opeyConsentId: string | null = null
204204
try {

server/test/OBPConsentsService.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('OBPConsentsService.createUserConsentsClient', () => {
3939
mockSession = {
4040
clientConfig: <APIClientConfig>{
4141
baseUri: 'https://test.openbankproject.com',
42-
version: 'v5.1.0',
42+
version: 'v6.0.0',
4343
oauthConfig: <OAuthConfig>{
4444
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
4545
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',
@@ -91,7 +91,7 @@ describe('OBPConsentsService.createConsent', () => {
9191
mockSession = {
9292
clientConfig: <APIClientConfig>{
9393
baseUri: 'https://test.openbankproject.com',
94-
version: 'v5.1.0',
94+
version: 'v6.0.0',
9595
oauthConfig: <OAuthConfig>{
9696
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
9797
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',
@@ -178,7 +178,7 @@ describe('OBPConsentsService.getExistingOpeyConsentId', () => {
178178
mockSession = {
179179
clientConfig: <APIClientConfig>{
180180
baseUri: 'https://test.openbankproject.com',
181-
version: 'v5.1.0',
181+
version: 'v6.0.0',
182182
oauthConfig: <OAuthConfig>{
183183
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
184184
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',

src/components/AutoLogout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function getOBPSuggestedTimeout() {
3737
let timeoutInSeconds: number;
3838
// Fetch the suggested timeout from the OBP API
3939
40-
const response = await fetch(`${obpApiHost}/obp/v5.1.0/ui/suggested-session-timeout`);
40+
const response = await fetch(`${obpApiHost}/obp/${import.meta.env.VITE_OBP_API_VERSION}/ui/suggested-session-timeout`);
4141
const json = await response.json();
4242
if(json.timeout_in_seconds) {
4343
timeoutInSeconds = json.timeout_in_seconds;

src/components/Menu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const clearCacheStorage = (event: any) => {
5252
<el-row>
5353
<el-col :span="10" class="menu-left">
5454
&nbsp;&nbsp;
55-
<span id="selected-api-version" class="host">OBPv5.1.0</span>
55+
<span id="selected-api-version" class="host"></span>
5656
</el-col>
5757
<el-col :span="14" class="menu-right">
5858
<span class="host" id="cache-storage-status" @click="clearCacheStorage">App Version: {{ APP_VERSION }}</span>

0 commit comments

Comments
 (0)