OpenAPI Documentation¶
Memista automatically generates OpenAPI (Swagger) documentation for its HTTP API.
Accessing Documentation¶
When the server is running, access interactive documentation at:
| Interface | URL | Description |
|---|---|---|
| Swagger UI | /swagger-ui/ |
Interactive API explorer |
| Redoc | /redoc/ |
Clean, responsive documentation |
| RapiDoc | /rapidoc/ |
Modern documentation viewer |
| Scalar | /scalar/ |
Developer-friendly API docs |
| OpenAPI JSON | /openapi.json |
Raw specification |
Using Swagger UI¶
Swagger UI provides an interactive interface to explore and test the API:
- Navigate to
http://localhost:8083/swagger-ui/ - Browse available endpoints
- Click an endpoint to expand it
- Click "Try it out" to test
- Fill in parameters and click "Execute"
- View the response
Example: Testing Insert¶
- Expand
POST /v1/insert - Click "Try it out"
- Enter the request body:
- Click "Execute"
- View the response below
Using Redoc¶
Redoc provides a clean, searchable documentation interface:
- Navigate to
http://localhost:8083/redoc/ - Use the sidebar to navigate endpoints
- View request/response schemas
- Copy code examples
Using RapiDoc¶
RapiDoc offers a modern, customizable documentation experience:
- Navigate to
http://localhost:8083/rapidoc/ - Switch between light/dark themes
- Use the search functionality
- Test endpoints directly
Using the Raw OpenAPI Spec¶
Fetch the raw specification for tooling integration:
Importing into Postman¶
- Open Postman
- Click "Import"
- Select "Link"
- Enter
http://localhost:8083/openapi.json - Click "Import"
Importing into Insomnia¶
- Open Insomnia
- Click "Import/Export"
- Select "Import Data"
- Choose "From URL"
- Enter
http://localhost:8083/openapi.json
Code Generation¶
Use the OpenAPI spec to generate client libraries:
Python Client (using openapi-generator)¶
openapi-generator-cli generate \
-i http://localhost:8083/openapi.json \
-g python \
-o ./memista-client-python
TypeScript Client¶
openapi-generator-cli generate \
-i http://localhost:8083/openapi.json \
-g typescript-fetch \
-o ./memista-client-ts
Go Client¶
openapi-generator-cli generate \
-i http://localhost:8083/openapi.json \
-g go \
-o ./memista-client-go
Schema Documentation¶
The OpenAPI specification includes full schema documentation for:
- Request bodies
- Response formats
- Data types
- Required fields
- Example values
This enables IDE autocompletion and validation when using generated clients.