Files
api-codegen/tests/fixtures/complex.json
2025-10-28 09:58:44 +03:00

317 lines
6.4 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Complex API",
"version": "1.0.0",
"description": "Большая спецификация для тестирования производительности"
},
"servers": [
{
"url": "https://api.example.com"
}
],
"paths": {
"/products": {
"get": {
"operationId": "ProductController_list",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
}
}
}
},
"post": {
"operationId": "ProductController_create",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateProduct"
}
}
}
},
"responses": {
"201": {
"description": "Created"
}
}
}
},
"/products/{id}": {
"get": {
"operationId": "ProductController_getById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
},
"put": {
"operationId": "ProductController_update",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"operationId": "ProductController_delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Deleted"
}
}
}
},
"/categories": {
"get": {
"operationId": "CategoryController_list",
"responses": {
"200": {
"description": "OK"
}
}
},
"post": {
"operationId": "CategoryController_create",
"responses": {
"201": {
"description": "Created"
}
}
}
},
"/categories/{id}": {
"get": {
"operationId": "CategoryController_getById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/orders": {
"get": {
"operationId": "OrderController_list",
"responses": {
"200": {
"description": "OK"
}
}
},
"post": {
"operationId": "OrderController_create",
"responses": {
"201": {
"description": "Created"
}
}
}
},
"/orders/{id}": {
"get": {
"operationId": "OrderController_getById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/customers": {
"get": {
"operationId": "CustomerController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/payments": {
"get": {
"operationId": "PaymentController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/invoices": {
"get": {
"operationId": "InvoiceController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/shipping": {
"get": {
"operationId": "ShippingController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/reports": {
"get": {
"operationId": "ReportController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/analytics": {
"get": {
"operationId": "AnalyticsController_getData",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/settings": {
"get": {
"operationId": "SettingsController_get",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/notifications": {
"get": {
"operationId": "NotificationController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/webhooks": {
"get": {
"operationId": "WebhookController_list",
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"price": {
"type": "number"
},
"category": {
"$ref": "#/components/schemas/Category"
}
}
},
"CreateProduct": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"price": {
"type": "number"
}
}
},
"Category": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}