OpenAPI speccy lint 工具,"Specification schema is invalid."
OpenAPI speccy lint tool, "Specification schema is invalid."
使用OpenApi speccy V0.8.1工具。工具将显示网站但不会 lint。
以下是不会 lint 的 hello world 示例。
{
"openapi": "3.0",
"info": {
"title": "Hello",
"version": "1.0.1"
},
"paths": {
"/hello_query": {
"get": {
"description": "Hello query",
"operationId": "hello_query",
"responses": {
"200": {
"description": "search results matching criteria",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
与 "swagger": "2.0"
不同,OpenAPI 3.0 的 openapi
字段需要 3-digit version number:
"openapi": "3.0.0"
或
"openapi": "3.0.1"
使用OpenApi speccy V0.8.1工具。工具将显示网站但不会 lint。 以下是不会 lint 的 hello world 示例。
{
"openapi": "3.0",
"info": {
"title": "Hello",
"version": "1.0.1"
},
"paths": {
"/hello_query": {
"get": {
"description": "Hello query",
"operationId": "hello_query",
"responses": {
"200": {
"description": "search results matching criteria",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
与 "swagger": "2.0"
不同,OpenAPI 3.0 的 openapi
字段需要 3-digit version number:
"openapi": "3.0.0"
或
"openapi": "3.0.1"