example.json•3.42 kB
{
"openapi": "3.0.0",
"info": {
"title": "Sample Service API Documentation",
"version": "1.0.0"
},
"servers": [
{
"url": "example.com",
"description": "ModelService API Server"
}
],
"paths": {
"/api/model/services/{ID}": {
"get": {
"summary": "Get model service API documentation",
"description": "Retrieves the API documentation for a specific model service",
"parameters": [
{
"name": "ID",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Model service ID"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Descriptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string",
"description": "Title of the API documentation section"
},
"Content": {
"type": "string",
"description": "Content of the API documentation section"
}
}
}
}
}
}
}
}
}
}
}
},
"/api/model/services/{id}": {
"post": {
"summary": "Call model service",
"description": "Invokes a specific model service with provided parameters",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Model service ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "object",
"properties": {
"input": {
"type": "object",
"description": "Input parameters for the model service"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"output": {
"type": "string",
"description": "Output from the model service"
},
"time": {
"type": "number",
"description": "Processing time in milliseconds"
}
}
}
}
}
}
}
}
}
}
}