liferay-api-client-gen
v1.1.3
Published
The Liferay Headless API Client Generator is a command-line tool built with Node.js that helps developers discover Liferay Headless APIs and generate client wrappers to consume these APIs. Additionally, the tool provides a feature to generate CSV files fo
Downloads
3
Readme
Liferay Headless API Client Generator
The Liferay Headless API Client Generator is a command-line tool built with Node.js that helps developers discover Liferay Headless APIs and generate client wrappers to consume these APIs. Additionally, the tool provides a feature to generate CSV files for each RESTful application, describing the API paths, method names, and parameters.
Installation
To use the Liferay Headless API Client Generator, follow these steps:
Ensure you have Node.js installed on your system. You can download it from the official Node.js website: https://nodejs.org
Open a terminal or command prompt.
Install the Liferay Headless API Client Generator globally by running the following command:
npm install -g liferay-api-client-gen
This will install the tool globally, making it accessible from anywhere on your system.
Usage
Once the installation is complete, you can use the Liferay Headless API Client Generator as follows:
Open a terminal or command prompt.
Run the following command to start the tool:
liferay-code-gen
The tool will prompt you to provide the necessary information to discover the Liferay Headless APIs and generate the client wrappers. Follow the prompts and provide the requested details, such as the Liferay API base URL and authentication credentials.
Once the process is complete, the tool will generate the client wrappers for the discovered APIs, which you can use in your project.
Generate CSV Files
In addition to generating client wrappers, the Liferay Headless API Client Generator provides a feature to generate CSV files for each RESTful application. These CSV files describe the API paths, method names, and parameters.
To generate CSV files, follow these steps:
After starting the tool using the steps mentioned above, choose the option to generate CSV files.
Provide the necessary information, such as the output directory where the CSV files will be generated.
The tool will scan the discovered APIs and generate individual CSV files for each RESTful application, providing detailed information about the API paths, method names, and parameters.
The generated CSV files can be accessed in the specified output directory.