96 lines
3.4 KiB
PHP
96 lines
3.4 KiB
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use OpenApi\Attributes as OA;
|
|
|
|
#[OA\Info(
|
|
title: 'Parsa Aghayi Portfolio API',
|
|
version: '1.0.0',
|
|
description: 'REST API for Parsa Aghayi\'s personal portfolio and blog'
|
|
)]
|
|
#[OA\Server(
|
|
url: 'http://localhost:8000/api',
|
|
description: 'Development server'
|
|
)]
|
|
#[OA\Server(
|
|
url: 'https://backend.parsaaghayi.ir/api',
|
|
description: 'Production server'
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'Skill',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'description', type: 'string'),
|
|
new OA\Property(property: 'image', type: 'string'),
|
|
new OA\Property(property: 'link', type: 'string', nullable: true),
|
|
new OA\Property(property: 'percentage', type: 'integer'),
|
|
]
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'AboutMe',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'description', type: 'string'),
|
|
new OA\Property(property: 'image', type: 'string'),
|
|
new OA\Property(property: 'skills', type: 'array', items: new OA\Items(ref: '#/components/schemas/Skill')),
|
|
]
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'Service',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'imageSrc', type: 'string'),
|
|
new OA\Property(property: 'altText', type: 'string'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'description', type: 'string'),
|
|
new OA\Property(property: 'created_at', type: 'string', format: 'datetime'),
|
|
new OA\Property(property: 'updated_at', type: 'string', format: 'datetime'),
|
|
]
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'Project',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'category', type: 'string', nullable: true),
|
|
new OA\Property(property: 'images', type: 'array', items: new OA\Items(type: 'object')),
|
|
new OA\Property(property: 'created_at', type: 'string', format: 'datetime'),
|
|
new OA\Property(property: 'updated_at', type: 'string', format: 'datetime'),
|
|
]
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'Category',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'image', type: 'string'),
|
|
]
|
|
)]
|
|
#[OA\Schema(
|
|
schema: 'Post',
|
|
type: 'object',
|
|
properties: [
|
|
new OA\Property(property: 'id', type: 'integer'),
|
|
new OA\Property(property: 'title', type: 'string'),
|
|
new OA\Property(property: 'body', type: 'string'),
|
|
new OA\Property(property: 'excerpt', type: 'string'),
|
|
new OA\Property(property: 'slug', type: 'string'),
|
|
new OA\Property(property: 'featured_image', type: 'string', nullable: true),
|
|
new OA\Property(property: 'author', type: 'object'),
|
|
new OA\Property(property: 'category', type: 'object'),
|
|
new OA\Property(property: 'tags', type: 'array', items: new OA\Items(type: 'object')),
|
|
new OA\Property(property: 'published_at', type: 'string', format: 'datetime', nullable: true),
|
|
]
|
|
)]
|
|
class SwaggerDefinitions
|
|
{
|
|
}
|