A Node.js application designed to generate API documentation effortlessly using OpenAI's language models.
- API Endpoint Documentation: Generates simple documentation for live API endpoints.
- HTTPS Protocol Support: Currently operational for the HTTPS protocol.
- HTTP Request Method Support: Supports various HTTP request methods like POST and GET.
- LLMs Integration: Utilizes Language Models (LLMs) to infer key properties and their meanings.
- ExpressJS Server: Built as an ExpressJS server for ease of use and integration.
- Set Up the Node Server: Start the Node server on a designated port (e.g., port 4005).
- Generate Documentation:
- Append
localhost:4005/createDocsin place of the protocol in the API URL you want documentation for.- Example: For
https://www.example.com, make a call tolocalhost:4005/createDocs/example.com.
- Example: For
- The engine initiates a request to the provided endpoint and retrieves the response body.
- Utilizes the base URL, request headers, request body, and response body to understand the API's nature.
- The data is processed through an LLM to create comprehensive documentation.
- Receive Documentation:
- The generated documentation is sent back as a PDF file in response to the
localhost:4005/createDocsAPI call.
- Clone the repository.
- Run
npm installto install dependencies. - Obtain an OpenAI API key.
- Start the server by passing the API key as an environment variable.
OPEN_AI_KEY= node server.js
- Node.js
- Express.js
- OpenAI JavaScript SDK