mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-17 09:31:55 +00:00
6815a9dd86
Add a new postprocessing hook 'add_api_servers' that dynamically configures the servers array in the OpenAPI specification based on the request environment. This hook: - Detects the current environment (local, staging, or production) from the request host - Adds the current server URL as the primary option - Includes production (https://api.prowler.com) as a fallback option when generating from non-production environments - Enables users to toggle between local and production servers in Mintlify's API playground via a dropdown Server detection logic: - localhost/127.0.0.1 → "Local Development Server" - hosts with 'dev' or 'staging' → "Development/Staging API" - api.prowler.com → "Prowler Cloud API" This enables the "Try it out" feature in Mintlify documentation and allows testing against different environments without modifying the spec.