Generate Project Using API Specs
Generate Project Stub
Last updated
Was this helpful?
Generate Project Stub
Last updated
Was this helpful?
This page provides detailed steps for generating projects using the given API specifications.
Prepare contracts that detail all the APIs that the service is going to expose for external consumption. eGov uses a customised tool.
Download the jar file and make sure it is available in the classpath. Use the to generate client SDKs using these Swagger contracts.
Use the generic command below to create an API skeleton for any Swagger contract:
The following sequence is used to generate the API skeleton using codegen jar:
Navigate to the folder where you have downloaded the codegen jar.
Execute the following command:
OR
Rename the output
folder to birth-registration.
Import it in Eclipse or VS Code.
Update the spring-boot-starter-parent to 3.2.2 in pom.xml.
Perform a maven update once the spring boot version is updated.
Put a slash in front of server.contextPath and add this property to the application.properties file which helps request handlers to serve requests -
Add the below external dependencies to pom.xml:
Download the contract and save it in a file locally. Run the following command to generate the skeleton code from the contract.