本页面提供了关于 /api/openapi_spec
路径的 API 开放规范信息。
路径说明
/api/openapi_spec
是用于获取本站 API 开放规范的接口。
获取方式
使用 GET 方法访问 /api/openapi_spec
路径。
示例
curl -X GET http://example.com/api/openapi_spec
返回内容
API 开放规范将以 JSON 格式返回,具体结构如下:
{
"info": {
"title": "API 开放规范",
"version": "1.0.0",
"description": "本站 API 开放规范"
},
"paths": {
"/api/openapi_spec": {
"get": {
"summary": "获取 API 开放规范",
"description": "返回本站 API 开放规范信息",
"responses": {
"200": {
"description": "成功返回 API 开放规范信息",
"schema": {
"$ref": "#/components/schemas/OpenApiSpec"
}
}
}
}
}
},
"components": {
"schemas": {
"OpenApiSpec": {
"type": "object",
"properties": {
"info": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"version": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"paths": {
"type": "object"
}
}
}
}
}
}
扩展阅读
如果您想了解更多关于 API 开放规范的信息,可以访问本站 API 文档。
[center]