Files
sam-manage/config/api-explorer.php
hskwon bfbf4d3225 feat(api-explorer): Phase 1 기본 구조 및 OpenAPI 파싱 구현
- Config: api-explorer.php (환경, 보안, 캐시 설정)
- Migration: api_bookmarks, api_templates, api_histories, api_environments
- Model: ApiBookmark, ApiTemplate, ApiHistory, ApiEnvironment
- Service: OpenApiParserService, ApiRequestService, ApiExplorerService
- Controller: ApiExplorerController (CRUD, 실행, 히스토리)
- View: 3-Panel 레이아웃 (sidebar, request, response, history)
- Route: 23개 엔드포인트 등록

Swagger UI 대체 개발 도구, HTMX 기반 SPA 경험
2025-12-17 21:06:41 +09:00

98 lines
2.8 KiB
PHP

<?php
return [
/*
|--------------------------------------------------------------------------
| OpenAPI Spec File Path
|--------------------------------------------------------------------------
|
| api-docs.json 파일 경로
|
*/
'openapi_path' => env('API_EXPLORER_OPENAPI_PATH', base_path('../api/storage/api-docs/api-docs.json')),
/*
|--------------------------------------------------------------------------
| Default Environments
|--------------------------------------------------------------------------
|
| 기본 환경 설정 (사용자가 커스텀 환경을 추가하기 전 기본값)
|
*/
'default_environments' => [
[
'name' => '로컬',
'base_url' => 'http://api.sam.kr',
'api_key' => env('API_EXPLORER_LOCAL_KEY', ''),
],
[
'name' => '개발',
'base_url' => 'https://api.codebridge-x.com',
'api_key' => env('API_EXPLORER_DEV_KEY', ''),
],
],
/*
|--------------------------------------------------------------------------
| Proxy Settings
|--------------------------------------------------------------------------
|
| API 프록시 설정
|
*/
'proxy' => [
'timeout' => 30, // 초
'max_body_size' => 1024 * 1024, // 1MB
'allowed_hosts' => [ // 화이트리스트
'api.sam.kr',
'api.codebridge-x.com',
'localhost',
'127.0.0.1',
],
],
/*
|--------------------------------------------------------------------------
| History Settings
|--------------------------------------------------------------------------
|
| 히스토리 설정
|
*/
'history' => [
'max_entries' => 100, // 사용자당 최대
'retention_days' => 30, // 보관 기간
],
/*
|--------------------------------------------------------------------------
| Security Settings
|--------------------------------------------------------------------------
|
| 보안 설정
|
*/
'security' => [
'encrypt_tokens' => true, // API Key/Token 암호화
'mask_sensitive_headers' => [ // 히스토리에서 마스킹
'Authorization',
'X-API-KEY',
'Cookie',
],
],
/*
|--------------------------------------------------------------------------
| Cache Settings
|--------------------------------------------------------------------------
|
| OpenAPI 스펙 캐싱 설정
|
*/
'cache' => [
'enabled' => true,
'ttl' => 3600, // 1시간
'key' => 'api_explorer_openapi_spec',
],
];