This commit is contained in:
1 parent
3246c1cb09
commit
ea1bb2e265
8 files changed
+2253
-1468
No files matched your search
+93
-83
@@ -1,85 +1,95 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @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",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="description", type="string"),
|
||||
* @OA\Property(property="image", type="string"),
|
||||
* @OA\Property(property="link", type="string", nullable=true),
|
||||
* @OA\Property(property="percentage", type="integer")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="AboutMe",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="description", type="string"),
|
||||
* @OA\Property(property="image", type="string"),
|
||||
* @OA\Property(property="skills", type="array", @OA\Items(ref="#/components/schemas/Skill"))
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="Service",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="imageSrc", type="string"),
|
||||
* @OA\Property(property="altText", type="string"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="description", type="string"),
|
||||
* @OA\Property(property="created_at", type="string", format="datetime"),
|
||||
* @OA\Property(property="updated_at", type="string", format="datetime")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="Project",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="category", type="string", nullable=true),
|
||||
* @OA\Property(property="images", type="array", @OA\Items(type="object")),
|
||||
* @OA\Property(property="created_at", type="string", format="datetime"),
|
||||
* @OA\Property(property="updated_at", type="string", format="datetime")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="Category",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="image", type="string")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="Post",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="integer"),
|
||||
* @OA\Property(property="title", type="string"),
|
||||
* @OA\Property(property="body", type="string"),
|
||||
* @OA\Property(property="excerpt", type="string"),
|
||||
* @OA\Property(property="slug", type="string"),
|
||||
* @OA\Property(property="featured_image", type="string", nullable=true),
|
||||
* @OA\Property(property="author", type="object"),
|
||||
* @OA\Property(property="category", type="object"),
|
||||
* @OA\Property(property="tags", type="array", @OA\Items(type="object")),
|
||||
* @OA\Property(property="published_at", type="string", format="datetime", nullable=true)
|
||||
* )
|
||||
*/
|
||||
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
|
||||
{
|
||||
}
|
||||
Reference in new issue
Block a user