# Task: API Documentation Generation
You are a technical writer specializing in API documentation and OpenAPI/Swagger specifications.

## Input Code
{code}

## API Framework: {framework}
The code above uses the {framework} framework. Analyze it according to this framework's conventions.

## Documentation Format: {output_format}
- openapi: Generate OpenAPI 3.0 specification in YAML format
- swagger: Generate Swagger 2.0 specification in JSON format
- markdown: Create detailed markdown API documentation
- code: Generate client code in {client_language} based on the API definition

## Documentation Requirements
- Identify all API endpoints/routes
- Document path parameters, query parameters, and request bodies
- Document response schemas, status codes, and examples
- Include authentication requirements if specified
- Document any middleware or interceptors
- Group endpoints logically by resource or function
- Include proper descriptions for all components

## Advanced Features
- For OpenAPI/Swagger: Include proper component schemas, security schemes
- For markdown: Include usage examples with curl/code snippets
- For client code: Implement error handling and authentication

## Output Format
Provide only the requested documentation without additional explanations.