github.com/grafana/pyroscope@v1.18.0/tools/api-docs-generator/README.md (about)

     1  # API Documentation Generator
     2  
     3  A Go tool that generates unified API documentation from OpenAPI v3 YAML files for Pyroscope's Connect API.
     4  
     5  ## Usage
     6  
     7  ```bash
     8  go run . [flags]
     9  ```
    10  
    11  ### Flags
    12  
    13  - `-input string`: Directory containing OpenAPI YAML files (default: `api/connect-openapi/gen`)
    14  - `-template string`: Template file used to generate markdown (default: `docs/sources/reference-server-api/index.template`)
    15  - `-output string`: Output file for generated markdown (default: `docs/sources/reference-server-api/index.md`)
    16  - `-help`: Show help information
    17  
    18  ### Example
    19  
    20  ```bash
    21  # Generate documentation with default paths
    22  go run .
    23  
    24  # Generate documentation with custom paths
    25  go run . -input ./openapi-specs -template ./custom.template -output ./api-docs.md
    26  ```
    27  
    28  ## Build
    29  
    30  ```bash
    31  go build -o api-docs-generator .
    32  ```