<?php

use App\Http\Controllers\Api\V1\SerenataApiDocumentationController;
use App\Http\Controllers\Api\V1\SerenataIntegrationController;
use Illuminate\Support\Facades\Route;

Route::prefix('v1')->middleware(['api.token'])->group(function () {
    Route::get('/docs', [SerenataApiDocumentationController::class, 'index'])->name('api.v1.docs');
    Route::get('/openapi.json', [SerenataApiDocumentationController::class, 'spec'])->name('api.v1.openapi');
    Route::get('/me', [SerenataIntegrationController::class, 'me']);
    Route::get('/catalog', [SerenataIntegrationController::class, 'catalog']);
    Route::get('/serenatas', [SerenataIntegrationController::class, 'index']);
    Route::get('/serenatas/{reference}', [SerenataIntegrationController::class, 'show']);
    Route::post('/serenatas', [SerenataIntegrationController::class, 'store']);
});
