openapi ======= .. py:module:: openapi .. autoapi-nested-parse:: OpenAPI schema customization and code sample generation. Functions --------- .. autoapisummary:: openapi.create_custom_openapi_schema openapi.generate_code_sample Module Contents --------------- .. py:function:: create_custom_openapi_schema(app, logger) Create custom OpenAPI schema with service metadata and customizations. .. py:function:: generate_code_sample(language, method, path, parameters, base_url = '') Generate code sample for a given language, method, and path. Uses Jinja2 templates to generate code samples dynamically at runtime. The generated code includes a placeholder __API_SERVER_URL__ that will be replaced with the actual URL during documentation rendering. :param language: The programming language (shell, python, go, js) :param method: HTTP method (GET, POST, etc.) :param path: API endpoint path :param parameters: List of OpenAPI parameter definitions :param base_url: Base URL for the API (optional, defaults to empty string) :returns: Generated code sample as a string with __API_SERVER_URL__ placeholder