Validation 根据其模式验证swagger规范的示例部分

Validation 根据其模式验证swagger规范的示例部分,validation,swagger,schema,openapi,Validation,Swagger,Schema,Openapi,是否可以根据相应的模式验证swagger文档的示例部分 我已经找到了验证模式本身(如或等——但这只是linting)和根据模式验证请求/响应(如或等)的工具 但是我想验证响应中的示例和定义是否与模式一致。 例如: swagger: '2.0' paths: /test: get: description: test endpoint produces: - application/json responses: 20

是否可以根据相应的模式验证swagger文档的
示例
部分

我已经找到了验证模式本身(如或等——但这只是linting)和根据模式验证请求/响应(如或等)的工具

但是我想验证
响应中的
示例
定义
是否与模式一致。 例如:

swagger: '2.0'
paths:
  /test:
    get:
      description: test endpoint
      produces:
        - application/json
      responses:
        200:
          description: OK
          schema:
            type: object
            properties:
              name:
                type: string
              id:
                type: integer
            example:
              name: 13
              id: some string
即使
示例
包含不正确的结构,对于所有这些工具似乎都是“正确的”

有没有一种工具可以做到这一点