Skip to content

Commit 46f08b1

Browse files
authored
Merge pull request #743 from mittwald/how-to-create-an-instance
document creating an extension instance for testing purposes
2 parents 6bf13e3 + 61f3cce commit 46f08b1

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed

docs/contribution/40-how-to/5-local-development.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,45 @@ This makes the local development of Extensions challenging if the Extension heav
1010
However, there are ways to assist the local Extension development besides mocking the mStudio API, which might be difficult without deep knowledge of the API.
1111
We will explore these in the rest of this page.
1212

13+
## Creating an Extension Instance
14+
15+
:::note
16+
A [Context](../30-overview/1-extensions.mdx#extension-context) must be defined in order to create an Extension Instance.
17+
:::
18+
19+
When developing your Extension you can only completely test your Extension within the **mStudio**.\
20+
To do this, you must create an **Extension Instance**, which requires knowing the **Extension ID** of your Extension.\
21+
You can find the Extension ID in the "Entwicklung" tab of your Extension in the mStudio.
22+
23+
:::note
24+
All Extension Instances within your contributor are free of charge.
25+
:::
26+
27+
During development, your extension will **not** appear on the Marketplace.
28+
29+
### ...via the mStudio (recommended)
30+
31+
1. Open the **mStudio**.
32+
2. Navigate to the **Marketplace**.
33+
3. Select any Extension.
34+
4. In the URL path, replace the Extension ID with the **Extension ID of your Extension**.
35+
36+
### ...via the API
37+
38+
You can create an Extension Instance programmatically by using the
39+
<OperationLink operation="extension-add-extension-to-context" /> operation.
40+
41+
For every required scope of your Extension, add an entry to the `scopes` field in your request body using the format:\
42+
`"area:(read|write|delete)"`.\
43+
You can find the scopes in the "**Berechtigungen**" section of your Extension in the mStudio.
44+
45+
![Extension permissions section](../../../resources/contributing/extensions/extension-berechtigungen.jpg)
46+
47+
### after publishing your Extension
48+
49+
After publishing your Extension the Extension Instances you created for testing purposes will be removed.
50+
You can always add your Extension to your Contextes free of charge.
51+
1352
## Authenticated Domain Actions
1453

1554
The easiest way to effectively test the interaction of your business logic and the mStudio is to use the mStudio public API directly.

i18n/de/docusaurus-plugin-content-docs/current/contribution/40-how-to/5-local-development.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,45 @@ Neben der Möglichkeit, die mStudio API zu mocken, was sich ohne Kenntnisse der
1111
existieren dennoch Mittel und Wege, um die lokale Entwicklung von Extensions zu erleichtern.
1212
Diese werden im Folgenden vorgestellt.
1313

14+
## Erstellen einer Extension Instance
15+
16+
:::note
17+
Es muss bereits ein [Context](../30-overview/1-extensions.mdx#extension-context) zugewiesen sein, bevor du eine Extension Instance erstellen kannst.
18+
:::
19+
20+
Wenn du deine Extension entwickelst, kannst du sie nur innerhalb des **mStudio** vollständig testen.\
21+
Dazu musst du eine **Extension Instance** erstellen, wofür du die **Extension ID** deiner Extension kennen musst.\
22+
Die Extension ID kann unter dem "Entwicklung" Tab der Extension im mStudio eingesehen werden.
23+
24+
:::note
25+
Alle Extension Instances innerhalb deines Contributors sind kostenlos.
26+
:::
27+
28+
Während der Entwicklung wird deine Extension **nicht** im Marktplatz angezeigt.
29+
30+
### ...über das mStudio (empfohlen)
31+
32+
1. Öffne das **mStudio**.
33+
2. Navigiere zum **Marktplatz**.
34+
3. Wähle eine beliebige Extension aus.
35+
4. Ersetze in der URL-Pfad die Extension ID mit der **Extension ID deiner Extension**.
36+
37+
### ...über die API
38+
39+
Du kannst eine Extension Instance programmatisch mit der
40+
<OperationLink operation="extension-add-extension-to-context" /> Operation erstellen.
41+
42+
Für jeden benötigten Scope musst du im `scopes`-Feld deines Request-Bodys einen Eintrag im folgenden Format hinzufügen:\
43+
`"bereich:(read|write|delete)"`.
44+
Die benötigten Scopes findest du in dem Bereich "**Berechtigungen**" deiner Extension im mStudio.
45+
46+
![Extension Berechtigungen Bereich](../../../../../../resources/contributing/extensions/extension-berechtigungen.jpg)
47+
48+
### Nach der Veröffentlichung deiner Extension
49+
50+
Nach der Veröffentlichung deiner Extension werden die Extension Instances, die du zu Testzwecken erstellt hast, **entfernt**.
51+
Du kannst deine Extension jedoch jederzeit kostenlos zu deinen Contextes hinzufügen.
52+
1453
## Authentifizierte Domain Actions
1554

1655
Um die Geschäftslogik im Zusammenspiel mit dem mStudio effektiv zu testen, ist es am einfachsten,
93.5 KB
Loading

0 commit comments

Comments
 (0)