feat: [api-explorer] Phase 1 기본 구조 및 OpenAPI 파싱 구현
- Config, Service, Controller, View 생성 - Model 4개 (admin_api_* 테이블 참조) - 3-Panel 레이아웃 (sidebar, request, response) - HTMX 기반 동적 UI - 마이그레이션은 api/ 프로젝트에서 관리
This commit is contained in:
97
config/api-explorer.php
Normal file
97
config/api-explorer.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?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',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user