Skip to content

Commit b75c6db

Browse files
lastupdated init (tbc) + repo name change
1 parent 9da55a3 commit b75c6db

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

docs/documentation/integration/webservices/custom-services.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ sidebar_position: 60
33
title: Custom services
44
---
55

6-
Custom services
7-
===============
6+
# Custom services
87

9-
Introduction
10-
------------
8+
## Introduction
119

1210
This document describes how to implement custom services (e.g. custom REST APIs) using external objects.
1311

@@ -29,34 +27,35 @@ The calls examples are given using the `curl` command line tool
2927
> In versions 4.0+ a technical session is used to avoid taking care of the session cookie.
3028
3129
For an application deployed on `myapp` webapp root, the base URL of the custom services is:
30+
3231
```
3332
http[s]://<host[:<port>]>/myapp/api/ext
3433
```
35-
For an application deployed on the default webapp root, the base URL of the custom services is:
34+
35+
For an application deployed on the default webapp root, the base URL of the custom services is :
36+
3637
```
3738
http[s]://<host[:<port>]>/api/ext
3839
```
40+
3941
It will be noted `<base URL>` in the rest of the document.
4042

4143
> **Warning**: In production the services endpoint's URL should be restricted only to allowed origins e.g. using URL filtering based on request's origin IP address or similar approaches.
4244
43-
Scalability and performances
44-
----------------------------
45+
## Scalability and performances
4546

4647
For optimal performances under high concurrent volume it may be useful to enable the API pooling by setting the `USE_WEBSERVICES_OBJECTPOOL` to `yes`, especially
4748
when using a single user (e.g. calls from a "public" frontend).
4849

4950
This allow calls to the services to be processed by a per-user pool of external objects.
50-
The pool size can be adjusted/limied using the `WEBSERVICES_EXTOBJECTPOOL_MAXPEROBJECT` and `WEBSERVICES_EXTOBJECTPOOL_MAXTOTAL` system parameters.
51+
The pool size can be adjusted/limied using the `WEBSERVICES_EXTOBJECTPOOL_MAXPEROBJECT` and `WEBSERVICES_EXTOBJECTPOOL_MAXTOTAL` system parameters.
5152

52-
Service implementation
53-
----------------------
53+
## Service implementation
5454

5555
A custom service is just a plain external object (check [this document](/docs/documentation/core/externalobject-code-examples) for general principles of external objects).
5656

5757
In particular this external object needs to be granted to the user that will be calling it on the API endpoint.
5858

59-
6059
### Java
6160

6261
In **Java** as of version 4.0.P23 you can extends the more convenient `com.simplicite.webapp.services.RESTServiceExternalObject` helper class
@@ -91,34 +90,34 @@ public class MyServiceV1 extends com.simplicite.webapp.services.RESTServiceExter
9190

9291
> **Note**: by default the non implemented method `get/post/put/del/head` of this helper class return a plain 400 ("Bad request") error.
9392
94-
Service call
95-
------------
93+
## Service call
9694

9795
Then the service could be called (using `POST` method in this example) like this:
96+
9897
```shell
99-
curl <credentials> -X POST -H "Content-type:application/json" -d @req.json "<base URL>/MyServiceV1"
98+
curl <credentials> -X POST -H "Content-type:application/json" -d @req.json "<base URL>/MyServiceV1"
10099
```
100+
101101
Where, for instance if `req.json` is:
102102

103103
```json
104104
{
105-
"name": "Bob"
105+
"name": "Bob"
106106
}
107107
```
108108

109109
The result is then:
110110

111111
```json
112112
{
113-
"request" : {
114-
"name": "Bob"
115-
},
116-
"response": "Hello Bob!"
113+
"request": {
114+
"name": "Bob"
115+
},
116+
"response": "Hello Bob!"
117117
}
118118
```
119119

120-
Mapped business object services helper class
121-
--------------------------------------------
120+
## Mapped business object services helper class
122121

123122
As of version 4.0.P23 a high-level helper class `com.simplicite.webapp.services.RESTMappedObjectsExternalObject`
124123
is provided to simply expose Simplicit&eacute; business object CRUD in a simplified and customized way.
@@ -159,4 +158,3 @@ With the above mapping the user and responsibilities standard objects are availa
159158
- `/api/v1/users/1/user-resps` select (GET) the responsibilities of user with row ID `1`
160159

161160
An OpenAPI schema is available on `/api/v1/openapi.yml`
162-

docs/documentation/integration/webservices/git-repositories.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ sidebar_position: 20
33
title: Git repositories
44
---
55

6-
Git repositories (/git)
7-
================
6+
# Git repositories (/git)
87

98
As of **version 3.2 MAINTENANCE 03**, a new endpoint is available to export/import modules using [Git](https://git-scm.com/) over HTTP(S).
109

1110
This feature relies on the Eclipse [JGit](https://github.com/eclipse-jgit/jgit) library.
1211

1312
> **Warning**: In production this Git endpoint's URL should be restricted only to allowed origins e.g. using URL filtering on request's origin IP address or similar approaches.
1413
15-
Configuration
16-
-------------
14+
## Configuration
1715

1816
The Git repositories are stored on the server file system.
1917

@@ -26,27 +24,26 @@ This can be done either:
2624

2725
Then you also need to set the `USE_GIT` system parameter to `yes`.
2826

29-
Export
30-
------
27+
## Export
3128

3229
To export the `MyModule` module as a Git repository the first thing to do is to create or update the module's repository
3330
using the dedicated action on the _Module_ object:
3431

3532
![Commit module to Git repository](img/git-repositories/git-repositories-commitmodule.png)
3633

3734
Then you can clone the module's repository by:
35+
3836
```shell
39-
git clone http(s)://<host name>[/<app context root>]/git/<module name>
37+
git clone http(s)://<host name>[/<app context root>]/git/<module name>
4038
```
39+
4140
The credentials you have to use in this case are the same as the one you can use for the I/O interface.
4241

43-
Import
44-
------
42+
## Import
4543

4644
Any `git push [origin]` on the cloned module's repository triggers a module import (e.g. after having made some local changes or to upgrade another instance by pushing on another remote).
4745

48-
Import from an origin remote
49-
----------------------------
46+
## Import from an origin remote
5047

5148
It is possible to configure a module that is linked to an external Git repository by adding following settings to your module:
5249

@@ -66,7 +63,7 @@ E.g. from another instance's module repository:
6663
Any call to the _Import module_ action will then result in either a clone or a pull on the configured remote Git repository.
6764

6865
> Typical use case is to link a "secondary" instance to a "primary" instance. In such a case there are 2 possible ways to export/import a module from the "primary" to the "secondary" instance:
69-
>
66+
>
7067
> - Directly use the _Import module_ action from the "secondary" instance (that will be pulling last commit(s) from the "primary" instance)
7168
> - Use a clone of the "primary" instance Git repository configured with an additional remote that points to the "secondary" instance.
7269
> Then `git pull` will pull from the "primary" instance and `git push <remote name>` will push to the "secondary" instance.
@@ -87,8 +84,7 @@ E.g. from a **public** GitHub repository:
8784
As of version 5.2, you can set the JVM properties (`remote.git.username/password`) or the environment variables (`REMOTE_GIT_USERNAME/PASSWORD`)
8885
if you want to avoid configuring username/password credentials in your module's settings. A **much better approach** being to use a SSH URI with configured SSH public/private keys.
8986

90-
Advanced
91-
--------
87+
## Advanced
9288

9389
The Git repositories created/cloned by Simplicit&eacute;:
9490

docs/versions/release-notes/v5-1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
sidebar_position: 70
33
title: ❌ v5.1
4+
last_update:
5+
date: 2023-10-31
46
---
57

68
Version 5.1.x release note

docs/versions/release-notes/v6-0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
sidebar_position: 40
33
title: ❌ v6.0
4+
last_update:
5+
date: 2024-10-31
46
---
57

68
Version 6.0 release note

docusaurus.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const config = {
1414
baseUrl: "/",
1515
// GitHub pages deployment config.
1616
organizationName: "simplicitesoftware", // Usually your GitHub org/user name.
17-
projectName: "docusaurus", // Usually your repo name.
17+
projectName: "documentation", // Usually your repo name.
1818
onBrokenLinks: "throw",
1919
onBrokenMarkdownLinks: "throw",
2020
onBrokenAnchors: "throw",
@@ -37,7 +37,7 @@ const config = {
3737
({
3838
docs: {
3939
sidebarPath: "./sidebars.js",
40-
showLastUpdateTime: true,
40+
showLastUpdateTime: true
4141
},
4242
theme: {
4343
customCss: "./src/css/custom.css",
@@ -93,7 +93,7 @@ const config = {
9393
prism: {
9494
theme: prismThemes.github,
9595
darkTheme: prismThemes.dracula,
96-
additionalLanguages: ['java'],
96+
additionalLanguages: ['java', 'bash'],
9797
},
9898
algolia: {
9999
// The application ID provided by Algolia

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@mdx-js/react": "^3.0.0",
2626
"clsx": "^2.0.0",
2727
"prism-react-renderer": "^2.3.0",
28+
"prismjs": "^1.30.0",
2829
"react": "^19.0.0",
2930
"react-dom": "^19.0.0"
3031
},

0 commit comments

Comments
 (0)