d360
v1.1.4
Published
Document360 official command-line interface (CLI)
Maintainers
Readme
The d360 package provides the capability to both manage and synchronize your API Definition with Document360. By utilizing this package within Document360, you will be able to effortlessly generate API documentation for both internal and external consumers, automatically generated from your API definition files
Table of Contents
Setup
In order to install our package, it is required that you have Node.js already installed on your system. Once Node.js is successfully installed, you can proceed to directly install our package from the npm registry.
npm install -g d360Note: We recommend using Node.js v14 or later. After a global install you can verify the CLI is available by running
d360 --help. If the command is not found, ensure your global npm bin directory is on your PATH.
Commands
Our npm package includes a list of available commands, which are as follows:
- apidocs -
Generate API Documentationfrom your API Definition file - apidocs:resync - Resync your API Definition
apidocs
By utilizing the 'apidocs' command, you will have the ability to generate API documentation directly from your API Definition file.
d360 apidocs --apiKey=c92e71ab-ebdf-4007-89ed-5d47493052cd
--userId=3340e95e-2b68-4a3f-a8c9-124bcaec9972
--versionId=d486783f-b833-446e-aa71-615ac51392c3
--path=https://petstore.swagger.io/v2/swagger.json| Options | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| apiKey string | Project API Key |
| userId string | User Id that's used to generate API Docs |
| versionId string | Project Version Id |
| apihubUrl string | APIHUB Base URL. The default value for this parameter is 'https://apihub.document360.io' |
| path string | File path of your respective API Reference |
| force boolean | Force import your API Reference. It will import even if there are errors or warnings present within your specification files. |
apidocs:resync
With the 'apidocs:resync' command, you are able to update or resynchronize your API Definition.
d360 apidocs:resync --apiKey=c92e71ab-ebdf-4007-89ed-5d47493052cd
--userId=3340e95e-2b68-4a3f-a8c9-124bcaec9972
--apiReferenceId=d486783f-b833-446e-aa71-615ac51392c3
--path=https://petstore.swagger.io/v2/swagger.json| Options | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------- |
| apiKey string | Project API Key |
| userId string | User Id that's used to resync API Reference |
| apiReferenceId string | API Reference Id to resync |
| apihubUrl string | APIHUB Base URL. The default value for this parameter is 'https://apihub.document360.io' |
| path string | File path of your respective API Definitions |
| force boolean | Force resync your API Reference. It will resync even your spec files has errors and warnings |
apidocs:validate
With the 'apidocs:validate' command, you will be able to validate your OpenAPI Specification(OAS) file.
d360 apidocs:validate --apiKey=c92e71ab-ebdf-4007-89ed-5d47493052cd
--apihubUrl=https://apihub.document360.io
--path=https://petstore.swagger.io/v2/swagger.json| Options | Description |
| ------------------ | ---------------------------------------------------------------------------------------- |
| apiKey string | Project API Key |
| apihubUrl string | APIHUB Base URL. The default value for this parameter is 'https://apihub.document360.io' |
| path string | File path of your respective API Definitions |
What's Next
We continually work to improve this CLI. Backward compatibility is maintained wherever possible so you can upgrade with confidence.
