mirror of
https://github.com/OpenBankProject/API-Explorer-II.git
synced 2026-02-06 10:47:04 +00:00
Merge pull request #131 from constantine2nd/develop
API Explorer II - make v6.0.0 the default version
This commit is contained in:
commit
b5db95e9e3
@ -7,10 +7,10 @@ VITE_OBP_API_HOST=https://apisandbox.openbankproject.com
|
||||
VITE_OBP_API_PORTAL_HOST=https://apisandbox.openbankproject.com
|
||||
####################################################################################
|
||||
|
||||
VITE_OBP_API_VERSION=v5.1.0
|
||||
VITE_OBP_API_VERSION=v6.0.0
|
||||
#The default version of the root page, it has the default value `OBP+VITE_OBP_API_VERSION`
|
||||
#The format must follow standard+Version, e.g., OBPv5.1.0, BGv1, or BGv1.3.
|
||||
#VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0
|
||||
#VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv6.0.0
|
||||
|
||||
# API Manager
|
||||
VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com
|
||||
|
||||
@ -18,12 +18,12 @@ RUN go build -v -o /usr/src/app/prestart
|
||||
FROM registry.access.redhat.com/ubi9/nginx-120
|
||||
|
||||
ENV VITE_OBP_LOGO_URL=https://static.openbankproject.com/images/obp_logo.png \
|
||||
VITE_OBP_API_VERSION='v5.1.0' \
|
||||
VITE_OBP_API_VERSION='v6.0.0' \
|
||||
VITE_OBP_LINKS_COLOR='#39455f' \
|
||||
VITE_OBP_HEADER_LINKS_COLOR='#52b165' \
|
||||
VITE_OBP_HEADER_LINKS_HOVER_COLOR='#39455f' \
|
||||
VITE_OBP_HEADER_LINKS_BACKGROUND_COLOR='#eef0f4' \
|
||||
VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0 \
|
||||
VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv6.0.0 \
|
||||
VITE_CHATBOT_ENABLED=false \
|
||||
VITE_SHOW_API_MANAGER_BUTTON=false
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ export default class OBPConsentsService {
|
||||
// I.e. give permission to Opey to do anything on behalf of the logged in user
|
||||
|
||||
// Get the Consents API client from the OBP SDK
|
||||
const client = await this.createUserConsentsClient(session, '/obp/v5.1.0/my/consents/IMPLICIT', 'POST')
|
||||
const client = await this.createUserConsentsClient(session, `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents/IMPLICIT`, 'POST')
|
||||
if (!client) {
|
||||
throw new Error('Could not create Consents API client')
|
||||
}
|
||||
@ -150,7 +150,7 @@ export default class OBPConsentsService {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await this._sendOBPRequest(`/obp/v5.1.0/user/current/consents/${consentId}`, 'GET', clientConfig)
|
||||
const response = await this._sendOBPRequest(`/obp/${process.env.VITE_OBP_API_VERSION}/user/current/consents/${consentId}`, 'GET', clientConfig)
|
||||
|
||||
session['opeyConfig'] = {
|
||||
authConfig: {
|
||||
@ -182,7 +182,7 @@ export default class OBPConsentsService {
|
||||
|
||||
// Get the Consents API client from the OBP SDK
|
||||
// The OBP SDK is messed up here, so we'll need to use Fetch until the SWAGGER WILL ACTUALLY WORK
|
||||
// const client = await this.createUserConsentsClient(session, '/obp/v5.1.0/my/consents/IMPLICIT', 'POST')
|
||||
// const client = await this.createUserConsentsClient(session, `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents/IMPLICIT`, 'POST')
|
||||
// if (!client) {
|
||||
// throw new Error('Could not create Consents API client')
|
||||
// }
|
||||
@ -197,8 +197,8 @@ export default class OBPConsentsService {
|
||||
|
||||
// We need to change this back to consent infos once OBP shows 'EXPIRED' in the status
|
||||
// Right now we have to check the JWT ourselves
|
||||
const consentInfosPath = '/obp/v5.1.0/my/consents'
|
||||
//const consentInfosPath = '/obp/v5.1.0/my/consent-infos'
|
||||
const consentInfosPath = `/obp/${process.env.VITE_OBP_API_VERSION}/my/consents`
|
||||
//const consentInfosPath = `/obp/${process.env.VITE_OBP_API_VERSION}/my/consent-infos`
|
||||
|
||||
let opeyConsentId: string | null = null
|
||||
try {
|
||||
|
||||
@ -39,7 +39,7 @@ describe('OBPConsentsService.createUserConsentsClient', () => {
|
||||
mockSession = {
|
||||
clientConfig: <APIClientConfig>{
|
||||
baseUri: 'https://test.openbankproject.com',
|
||||
version: 'v5.1.0',
|
||||
version: 'v6.0.0',
|
||||
oauthConfig: <OAuthConfig>{
|
||||
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
|
||||
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',
|
||||
@ -91,7 +91,7 @@ describe('OBPConsentsService.createConsent', () => {
|
||||
mockSession = {
|
||||
clientConfig: <APIClientConfig>{
|
||||
baseUri: 'https://test.openbankproject.com',
|
||||
version: 'v5.1.0',
|
||||
version: 'v6.0.0',
|
||||
oauthConfig: <OAuthConfig>{
|
||||
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
|
||||
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',
|
||||
@ -178,7 +178,7 @@ describe('OBPConsentsService.getExistingOpeyConsentId', () => {
|
||||
mockSession = {
|
||||
clientConfig: <APIClientConfig>{
|
||||
baseUri: 'https://test.openbankproject.com',
|
||||
version: 'v5.1.0',
|
||||
version: 'v6.0.0',
|
||||
oauthConfig: <OAuthConfig>{
|
||||
consumerKey: 'jgaawf2fnj4yixqdsfaq4gipt4v1wvgsxgre',
|
||||
consumerSecret: 'asdofasdpfjawpefapwehhpfawheofphawfefh',
|
||||
|
||||
@ -37,7 +37,7 @@ async function getOBPSuggestedTimeout() {
|
||||
let timeoutInSeconds: number;
|
||||
// Fetch the suggested timeout from the OBP API
|
||||
|
||||
const response = await fetch(`${obpApiHost}/obp/v5.1.0/ui/suggested-session-timeout`);
|
||||
const response = await fetch(`${obpApiHost}/obp/${import.meta.env.VITE_OBP_API_VERSION}/ui/suggested-session-timeout`);
|
||||
const json = await response.json();
|
||||
if(json.timeout_in_seconds) {
|
||||
timeoutInSeconds = json.timeout_in_seconds;
|
||||
|
||||
@ -52,7 +52,7 @@ const clearCacheStorage = (event: any) => {
|
||||
<el-row>
|
||||
<el-col :span="10" class="menu-left">
|
||||
|
||||
<span id="selected-api-version" class="host">OBPv5.1.0</span>
|
||||
<span id="selected-api-version" class="host"></span>
|
||||
</el-col>
|
||||
<el-col :span="14" class="menu-right">
|
||||
<span class="host" id="cache-storage-status" @click="clearCacheStorage">App Version: {{ APP_VERSION }}</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user