Developer guide
This developer guide provides step-by-step instructions on how to set up your developer environment, contribute to the codebase, and enhance the capability of SysON.
1. Retrieving the source code
SysON is built upon the Eclipse Sirius Web project. SysON is licensed under the (EPL v2) Open Source license The source code is openly available on GitHub:https://github.com/eclipse-syson/syson
To get the source code, clone the repository by using either SSH:
git clone git@github.com:eclipse-syson/syson.git
or HTTPS:
git clone https://github.com/eclipse-syson/syson.git
2. Setting up your development environment
-
Download your coding environment Spring Tools 4.22.0
-
Ensure that m2e version from your environment is 2.6.0
-
Retrieve the source code or fork it if you want to make contribution
-
Import backend plugins from syson repository in your workspace
-
Update settings.xml file from your .m2 folder to give access to other repositories during the build To see dependance with access to add in settings.xml, have a look on backend\application\syson-application\pom.xml You need to create access tokens on Github to complete settings.xml.
-
Right click syson-services module and then Properties>JavaBuildPath>Source Add main/generated folder and remove excluded content and former antlr/grammar You should retrieve the following Java build path
-
Update Maven project by launching "ALT+F5" shortcut on all modules of your workspace
3. Generate a new version of SysIDE CLI
In the syson-import module, you’ll found a syside-cli-.js
file in src/main/resources
.
This file is used by the import process, to parse the SysML v2 textual files.
If you want to update the version on SysIDE used to parse textual files, you need to generate a new version of this syside-cli-.js
file.
Here are the steps to follow:
-
Clone the SysIDE repository from github.
-
Install pnpm.
-
Go to the root of your local SysIDE repository.
-
Execute
pnpm install
command. -
Execute `pnpm run build`command.
-
Execute
pnpm run --dir packages/syside-cli/ esbuild
command. -
It produces a
your_local_syside_repo/packages/syside-cli/out/index.js
file -
Get a copy of the
your-local-syside-repo/packages/syside-cli/out/index.js
file. -
Edit this file:
-
add
#!/usr/bin/env node
as first line -
add
src_default();
as last line -
rename it to
syside-cli.js
-
-
Copy the renamed file into
your_local_syson_repo/backend/application/syson-import/src/main/resources
(overwrite the existing file).
4. Generate a new OpenAPI documentation of REST API
-
Build and run the syson server locally (using docker compose as example) on
localhost:8080
. -
Download the documentation at the url http://localhost:8080/v3/api-docs/rest-apis
-
The swagger-ui user interface is
http://localhost:8080/swagger-ui/index.html#/