go-agent/codex/code/scripts/doc-api.sh
Snider 61e01bfdf1 feat: initial go-agent — agentci + jobrunner + plugins marketplace
Consolidates three codebases into a single agent orchestration repo:

- agentci (from go-scm): Clotho dual-run verification, agent config,
  SSH security (sanitisation, secure commands, token masking)
- jobrunner (from go-scm): Poll-dispatch-report pipeline with 7 handlers
  (dispatch, completion, auto-merge, publish draft, dismiss reviews,
  send fix command, tick parent epic)
- plugins marketplace (from agentic/plugins): 27 Claude/Codex/Gemini
  plugins with shared MCP server

All 150+ tests passing across 6 packages.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 15:47:19 +00:00

32 lines
867 B
Bash
Executable file

#!/bin/bash
TARGET_PATH=$1
# The second argument can be a path to scan for API endpoints.
SCAN_PATH=$2
if [ -z "$TARGET_PATH" ]; then
echo "Usage: doc-api.sh <TargetPath> [ScanPath]" >&2
exit 1
fi
# Default to scanning the 'src' directory if no path is provided.
if [ -z "$SCAN_PATH" ]; then
SCAN_PATH="src"
fi
SWAGGER_PHP_PATH="${TARGET_PATH}/vendor/bin/swagger-php"
FULL_SCAN_PATH="${TARGET_PATH}/${SCAN_PATH}"
if [ ! -d "$FULL_SCAN_PATH" ]; then
echo "Error: Scan directory does not exist at '$FULL_SCAN_PATH'." >&2
exit 1
fi
if [ -f "$SWAGGER_PHP_PATH" ]; then
echo "Found swagger-php. Generating OpenAPI spec from '$FULL_SCAN_PATH'..."
"$SWAGGER_PHP_PATH" "$FULL_SCAN_PATH"
else
echo "Error: 'swagger-php' not found at '$SWAGGER_PHP_PATH'." >&2
echo "Please ensure it is installed in your project's dev dependencies." >&2
exit 1
fi