Backend Developers Guide
Overview
PMS Portal is used by the Partners to onboard with MOSIP and manage Devices, FTM, Create API Keys and Create OIDC clients etc.
Partner Management module has two services:
Partner Management service
Policy Management service
The documentation here will guide you through the prerequisites required for the developer's setup.
Software setup
Below is a list of tools required in Partner Management Services:
JDK 11
Any IDE (like Eclipse, IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Postman
Git
Notepad++ (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up Partner Management Services on your local system:
Download
lombok.jar
andsettings.xml
from here.Install Apache Maven.
Copy the
settings.xml
to ".m2" folderC:\Users\<username>\.m2
.Install Eclipse.
Open the
lombok.jar
file and wait for some time until it completes the scan for Eclipse IDE and then clickInstall/Update
. Specify the eclipse installation location if required by clicking the ‘Specify location…’ button. Then, clickInstall/Update
the button to proceed.
Check the Eclipse installation folder
C:\Users\userName\eclipse\jee-2021-12\eclipse
to see iflombok.jar
is added. By doing this, you will not have to add the dependency of lombok in yourpom.xml
file separately as it is auto-configured by Eclipse.Configure the JDK (Standard VM) with your Eclipse by traversing through
Preferences → Java → Installed JREs
.
Code setup
For the code setup, clone the repository and follow the guidelines mentioned in the Code Contributions.
Importing and building a project
Open the project folder
partner-management-services\partner
wherepom.xml
is present.Open the command prompt from the same folder.
Run the command
mvn clean install -Dgpg.skip=true
to build the project and wait for the build to complete successfully.After building a project, open Eclipse and select
Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
This will import 5 projects into Eclipse:
partner, partner-management-service, pms-common, policy-management-service and policy-validator
After successful importing of all the projects, update each
project by right-clicking on Project → Maven → Update Project
.
Environment setup
For the environment setup, you need an external JAR that is available here with different versions. Download the below-mentioned JARs with appropriate latest/appropriate versions. You will need to input the appropriate artifact ID and version and other inputs.
kernel-auth-adapter.jar
E.g.: You can download
kernel-auth-adapter.jar
and add to theproject Libraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply
and Close).
Properties Files - Update
application-dev.properties
andbootstrap.properties
files in below folderpartner-management-services\partner\partner-management-service\src\main\resources
to run the Partner Management Service locally
Click the "run" option, the service will start locally on port 9109.
Policy management service also can run by following the above steps.
Partner Management Services API
For API documentation, refer here.
The APIs can be tested with the help of Postman or Swagger-UI.
Swagger is an interface description language for describing restful APIs expressed using JSON. Can access Swagger-UI of partner-management-services for dev-environment from
https://dev.mosip.net/v1/partnermanager/swagger-ui/index.html?configUrl=/v1/partnermanager/v3/api-docs/swagger-config
and localhost fromhttp://localhost:9109/v1/partnermanager/swagger-ui/index.html?configUrl=/v1/partnermanager/v3/api-docs/swagger-config
.Can access Swagger-UI of policy-management-services for dev-environment from
https://dev.mosip.net/v1/policymanager/swagger-ui/index.html?configUrl=/v1/policymanager/v3/api-docs/swagger-config
and localhost fromhttp://localhost:9107/v1/policymanager/swagger-ui/index.html?configUrl=/v1/policymanager/v3/api-docs/swagger-config
.Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster. It is widely used tool for API testing.
Download the JSON collection and then import it in your postman.
Last updated