{
"components": {
"schemas": {
"Loans": {
"properties": {
"borrower_id": {
"format": "uuid",
"type": "string"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"fee": {
"format": "double",
"type": "number"
},
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"type": "string"
},
"updated_at": {
"format": "date-time",
"type": "string"
},
"volume_id": {
"format": "uuid",
"nullable": true,
"type": "string"
}
},
"required": [
"id",
"borrower_id",
"status",
"fee",
"volume_id",
"created_at",
"updated_at"
],
"type": "object"
},
"LoansCreate": {
"properties": {
"borrower_id": {
"format": "uuid",
"type": "string"
},
"fee": {
"format": "double",
"type": "number"
},
"status": {
"type": "string"
},
"volume_id": {
"format": "uuid",
"nullable": true,
"type": "string"
}
},
"required": [],
"type": "object"
},
"LoansUpdate": {
"properties": {
"borrower_id": {
"format": "uuid",
"type": "string"
},
"fee": {
"format": "double",
"type": "number"
},
"status": {
"type": "string"
},
"volume_id": {
"format": "uuid",
"nullable": true,
"type": "string"
}
},
"required": [],
"type": "object"
},
"Pagination": {
"properties": {
"current_page": {
"type": "integer"
},
"per_page": {
"type": "integer"
},
"total_pages": {
"type": "integer"
},
"total_records": {
"type": "integer"
}
},
"type": "object"
},
"Volumes": {
"properties": {
"barcode": {
"nullable": true,
"type": "string"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"id",
"barcode",
"created_at"
],
"type": "object"
},
"VolumesCreate": {
"properties": {
"barcode": {
"nullable": true,
"type": "string"
}
},
"required": [],
"type": "object"
},
"VolumesUpdate": {
"properties": {
"barcode": {
"nullable": true,
"type": "string"
}
},
"required": [],
"type": "object"
}
}
},
"info": {
"title": "catalog-service",
"version": "0.4.2"
},
"openapi": "3.1.0",
"paths": {
"/svc/acme/catalog-service/_fn/export_loans": {
"post": {
"operationId": "export_loans",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Success"
}
},
"summary": "Custom: export_loans",
"tags": [
"custom"
]
}
},
"/svc/acme/catalog-service/_fn/loans_summary": {
"get": {
"operationId": "loans_summary",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Success"
}
},
"summary": "Custom: loans_summary",
"tags": [
"custom"
]
}
},
"/svc/acme/catalog-service/_fn/my_loans": {
"get": {
"operationId": "my_loans",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Success"
}
},
"summary": "Custom: my_loans",
"tags": [
"custom"
]
}
},
"/svc/acme/catalog-service/_fn/proxy_loans": {
"post": {
"operationId": "proxy_loans",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Success"
}
},
"summary": "Custom: proxy_loans",
"tags": [
"custom"
]
}
},
"/svc/acme/catalog-service/_fn/stripe_webhook": {
"post": {
"operationId": "stripe_webhook",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Success"
}
},
"summary": "Custom: stripe_webhook",
"tags": [
"custom"
]
}
},
"/svc/acme/catalog-service/loans": {
"get": {
"operationId": "list_loans",
"parameters": [
{
"description": "Page number (default: 1)",
"in": "query",
"name": "page",
"schema": {
"type": "integer"
}
},
{
"description": "Items per page (default: 50, max: 200)",
"in": "query",
"name": "per_page",
"schema": {
"type": "integer"
}
},
{
"description": "Sort by column (prefix - for DESC)",
"in": "query",
"name": "sort",
"schema": {
"type": "string"
}
},
{
"description": "JSON filter array",
"in": "query",
"name": "filter",
"schema": {
"type": "string"
}
},
{
"description": "Filter by id",
"in": "query",
"name": "id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Filter by borrower_id",
"in": "query",
"name": "borrower_id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Filter by status",
"in": "query",
"name": "status",
"schema": {
"type": "string"
}
},
{
"description": "Filter by fee",
"in": "query",
"name": "fee",
"schema": {
"format": "double",
"type": "number"
}
},
{
"description": "Filter by volume_id",
"in": "query",
"name": "volume_id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Filter by created_at",
"in": "query",
"name": "created_at",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "Filter by updated_at",
"in": "query",
"name": "updated_at",
"schema": {
"format": "date-time",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"pagination": {
"$ref": "#/components/schemas/Pagination"
},
"results": {
"items": {
"$ref": "#/components/schemas/Loans"
},
"type": "array"
}
},
"type": "object"
}
}
},
"description": "Paginated list"
}
},
"summary": "List loans",
"tags": [
"loans"
]
},
"post": {
"operationId": "create_loan",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoansCreate"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Loans"
}
}
},
"description": "Created"
}
},
"summary": "Create loan",
"tags": [
"loans"
]
}
},
"/svc/acme/catalog-service/loans/:id": {
"delete": {
"operationId": "delete_loan",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Deleted"
}
},
"summary": "Delete loan",
"tags": [
"loans"
]
},
"get": {
"operationId": "get_loan",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Loans"
}
}
},
"description": "Found"
},
"404": {
"description": "Not found"
}
},
"summary": "Get loan by ID",
"tags": [
"loans"
]
},
"put": {
"operationId": "update_loan",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoansUpdate"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Loans"
}
}
},
"description": "Updated"
}
},
"summary": "Update loan",
"tags": [
"loans"
]
}
},
"/svc/acme/catalog-service/volumes": {
"get": {
"operationId": "list_volumes",
"parameters": [
{
"description": "Page number (default: 1)",
"in": "query",
"name": "page",
"schema": {
"type": "integer"
}
},
{
"description": "Items per page (default: 50, max: 200)",
"in": "query",
"name": "per_page",
"schema": {
"type": "integer"
}
},
{
"description": "Sort by column (prefix - for DESC)",
"in": "query",
"name": "sort",
"schema": {
"type": "string"
}
},
{
"description": "JSON filter array",
"in": "query",
"name": "filter",
"schema": {
"type": "string"
}
},
{
"description": "Filter by id",
"in": "query",
"name": "id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Filter by barcode",
"in": "query",
"name": "barcode",
"schema": {
"type": "string"
}
},
{
"description": "Filter by created_at",
"in": "query",
"name": "created_at",
"schema": {
"format": "date-time",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"pagination": {
"$ref": "#/components/schemas/Pagination"
},
"results": {
"items": {
"$ref": "#/components/schemas/Volumes"
},
"type": "array"
}
},
"type": "object"
}
}
},
"description": "Paginated list"
}
},
"summary": "List volumes",
"tags": [
"volumes"
]
},
"post": {
"operationId": "create_volume",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VolumesCreate"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Volumes"
}
}
},
"description": "Created"
}
},
"summary": "Create volume",
"tags": [
"volumes"
]
}
},
"/svc/acme/catalog-service/volumes/:id": {
"delete": {
"operationId": "delete_volume",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Deleted"
}
},
"summary": "Delete volume",
"tags": [
"volumes"
]
},
"get": {
"operationId": "get_volume",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Volumes"
}
}
},
"description": "Found"
},
"404": {
"description": "Not found"
}
},
"summary": "Get volume by ID",
"tags": [
"volumes"
]
},
"put": {
"operationId": "update_volume",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VolumesUpdate"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Volumes"
}
}
},
"description": "Updated"
}
},
"summary": "Update volume",
"tags": [
"volumes"
]
}
}
}
}