Skip to content

Commit 2f8967a

Browse files
author
Christian Wick
committed
Resource updates
1 parent 39213ba commit 2f8967a

13 files changed

Lines changed: 58 additions & 30 deletions

File tree

docs/.vuepress/enhanceApp.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
module.exports = () => {
2-
// console.log('enhancedApp.js');
3-
}
1+

docs/.vuepress/nav/left/rest/v1/reference/merchant.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ function merchant_apiKeys() {
66
children: [
77
['/api/reference/rest/v1/merchant.apiKeys/', 'Overview'],
88
['/api/reference/rest/v1/merchant.apiKeys/create', 'create'],
9+
['/api/reference/rest/v1/merchant.apiKeys/list', 'list'],
910
['/api/reference/rest/v1/merchant.apiKeys/get', 'get'],
1011
['/api/reference/rest/v1/merchant.apiKeys/update', 'update'],
1112
['/api/reference/rest/v1/merchant.apiKeys/delete', 'delete'],

docs/.vuepress/theme/components/Models.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- <a :href="'#' + type.title" class="header-anchor">#</a> -->
2020
{{ type.title }}
2121
</h2>
22-
<p v-if="type.properties && type.description">
22+
<p v-if="type.properties || type.description">
2323
{{ type.description }}
2424
</p>
2525
<div v-if="type.properties" class="modelEntry">
@@ -112,7 +112,7 @@
112112
<p v-if="property.description">{{ property.description }}</p>
113113
</div>
114114
</div>
115-
<div v-else>
115+
<div v-if="!type.description && !type.properties">
116116
<p>
117117
No info available for <strong>{{ type.title }}</strong> at of this
118118
moment. Please
@@ -187,7 +187,7 @@ export default {
187187
} else if (site.pages[0].models) {
188188
data.types = site.pages[0].models;
189189
} else {
190-
console.warn('Neither page.models or site.pages[0].models found...');
190+
console.warn("Neither page.models or site.pages[0].models found...");
191191
}
192192
193193
// console.log(data.types);

docs/.vuepress/theme/components/PageResource.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
:to="'/api/guides/introduction/authentication/#authentication-using-key'"
4949
>{{ $frontmatter.authLevel }}
5050
</router-link>
51+
<router-link
52+
v-if="$frontmatter.authLevel === 'JWT'"
53+
:to="'/api/guides/introduction/authentication/#authentication-using-secret'"
54+
>{{ $frontmatter.authLevel }}
55+
</router-link>
56+
<router-link
57+
v-if="$frontmatter.authLevel === 'RSA'"
58+
:to="'/api/guides/introduction/authentication/#authentication-using-key'"
59+
>{{ $frontmatter.authLevel }}
60+
</router-link>
5161
</li>
5262
<li>Authorized Roles: {{ $frontmatter.authRoles }}</li>
5363
</ul>
@@ -123,6 +133,13 @@
123133
>
124134
Length: <code>{{ type.minLength }}</code>
125135
</li>
136+
<li v-else-if="type.minLength && type.maxLength">
137+
Length:
138+
<code
139+
>&#8804; {{ type.minLength }} && &#8805;
140+
{{ type.maxLength }}</code
141+
>
142+
</li>
126143
<li v-else-if="type.minLength">
127144
Length: <code>&#8805; {{ type.minLength }}</code>
128145
</li>

docs/.vuepress/theme/components/PageResourceOverview.vue

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@
1717
<router-link :to="'#resource'" class="header-anchor">#</router-link>
1818
Resource
1919
</h3>
20-
<p>There is no persistent data associated with this resource.</p>
21-
&nbsp; &nbsp; &nbsp;
22-
<Content />
20+
<div v-if="$frontmatter.resourceDesc === true">
21+
<Content slot-key="resource" :hasDescription="true" />
22+
</div>
23+
<div v-else>
24+
<p>There is no persistent data associated with this resource.</p>
25+
</div>
26+
27+
<!-- <Content /> -->
2328
<h2 id="http-request">
2429
<router-link :to="'#http-request'" class="header-anchor">#</router-link>
2530
HTTP Requests
@@ -52,7 +57,10 @@
5257
</table>
5358
<div v-else class="warning custom-block">
5459
<p class="custom-block-title">WARNING</p>
55-
<p>No Methods found for <strong>{{ $frontmatter.schema }}</strong>.</p>
60+
<p>
61+
No Methods found for <strong>{{ $frontmatter.schema }}</strong
62+
>.
63+
</p>
5664
</div>
5765
</div>
5866
<PageEdit />
@@ -72,7 +80,7 @@ const _ = require("lodash");
7280
7381
const yaml = require("js-yaml");
7482
75-
console.clear();
83+
// console.clear();
7684
7785
let getMethods;
7886
@@ -98,6 +106,9 @@ export default {
98106
methods: [],
99107
};
100108
},
109+
async extendPageData($page) {
110+
$page.size = await getAsyncData();
111+
},
101112
async beforeMount() {
102113
site = this.$site;
103114
page = this.$page;

docs/api/reference/rest/v1/merchant.apiKeys/create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.apiKeys
77
operationId: merchant.apiKeys.create
88
operation: post
99
method: create
10-
authLevel: KEY
11-
authRoles: All
10+
authLevel: RSA
11+
authRoles: SUPERUSER, INTEGRATOR
1212
---

docs/api/reference/rest/v1/merchant.apiKeys/delete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.apiKeys
77
operationId: merchant.apiKeys.delete
88
operation: delete
99
method: delete
10-
authLevel: KEY
11-
authRoles: All
10+
authLevel: RSA
11+
authRoles: SUPERUSER, INTEGRATOR
1212
---

docs/api/reference/rest/v1/merchant.apiKeys/get.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.apiKeys
77
operationId: merchant.apiKeys.get
88
operation: get
99
method: get
10-
authLevel: SECRET
11-
authRoles: All
10+
authLevel: JWT
11+
authRoles: USER, SUPERUSER, INTEGRATOR
1212
---

docs/api/reference/rest/v1/merchant.apiKeys/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ title: merchant.apiKeys
44
description: Overview
55
schema: merchant.apiKeys
66
api: merchant
7+
resourceDesc: true
78
---
89

9-
## Merchant API Keys
10+
::: slot resource
11+
In order to gain access to the [Merchant API](/api/reference/rest) a client must authenticate itself using the `X-Settle-User` ID and the JWT/RSA KEY of an existing user. This means that the first user for a Merchant must be created in the **Self Service Portal** or by an Integrator on behalf of the Merchant.
1012

11-
In order to gain access to the [Merchant API](/api/reference/rest) a client must authenticate itself using the ID and the secret/public key of an existing user. This means that the first user for a merchant must be created in the Self Service Portal or by an integrator on behalf of the merchant.
12-
13-
Each user is created for a specific merchant, which ID is given by the value of the **X-Settle-Merchant** header when making a [ `merchant.apiKeys.create` ](/api/reference/rest/v1/merchant.apiKeys/create/) request. A user can only interact with the API on behalf of the merchant which it was created for. The user ID is chosen on create and is has to be unique for the parent Merchant.
13+
Each `X-Settle-User` is created for a specific Merchant, which ID is given by the value of the `X-Settle-Merchant` header when making a [ `merchant.apiKeys.create` ](/api/reference/rest/v1/merchant.apiKeys/create/) request. An API User can only interact with the API on behalf of the Merchant which it was created for. The `X-Settle-User` ID is chosen on `merchant.apiKeys.create` and is has to be unique for the parent Merchant.
14+
:::

docs/api/reference/rest/v1/merchant.apiKeys/list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ schema: merchant.apiKeys
77
operationId: merchant.apiKeys.list
88
operation: get
99
method: list
10-
authLevel: KEY
11-
authRoles: SUPERUSER, INTEGRATOR
10+
authLevel: RSA
11+
authRoles: USER, SUPERUSER, INTEGRATOR
1212
---

0 commit comments

Comments
 (0)