AI-Engineer-Foundation / agent-protocol

Common interface for interacting with AI agents. The protocol is tech stack agnostic - you can use it with any framework for building agents.

Home Page:https://agentprotocol.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI schema validation

wilsonianb opened this issue · comments

Afaict the OpenAPI schemas were previously validated via

but this was removed in 949a177

Should swagger-cli and openapi-format be re-added?
I've alternatively used @stoplight/spectral-cli (and prettier) before:
https://github.com/interledger/open-payments/blob/main/.github/workflows/validate-openapi.yaml

~/agent-protocol$ npx @stoplight/spectral-cli lint schemas/openapi.yml

/home/brandon/agent-protocol/schemas/openapi.yml
   2:6   warning  info-contact               Info object must have "contact" object.                        info
  11:10  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks.post
  35:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks.post.tags[0]
  36:9   warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks.get
  70:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks.get.tags[0]
  72:9   warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}.get
  98:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}.get.tags[0]
  100:9  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/steps.get
 146:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/steps.get.tags[0]
 147:10  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/steps.post
 184:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/steps.post.tags[0]
  186:9  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/steps/{step_id}.get
 224:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/steps/{step_id}.get.tags[0]
  226:9  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/artifacts.get
 272:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/artifacts.get.tags[0]
 273:10  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/artifacts.post
 304:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/artifacts.post.tags[0]
  306:9  warning  operation-description      Operation "description" must be present and non-empty string.  paths./ap/v1/agent/tasks/{task_id}/artifacts/{artifact_id}.get
 340:11  warning  operation-tag-defined      Operation tags must be defined in global tags.                 paths./ap/v1/agent/tasks/{task_id}/artifacts/{artifact_id}.get.tags[0]
 406:16    error  oas3-valid-schema-example  "example" property type must be object                         components.schemas.TaskInput.example
 454:16    error  oas3-valid-schema-example  "example" property type must be object                         components.schemas.StepInput.example
 461:16    error  oas3-valid-schema-example  "example" property type must be object,null                    components.schemas.StepOutput.example
 497:19    error  oas3-valid-schema-example  "0" property type must be object                               components.schemas.Task.allOf[1].properties.artifacts.example[0]

✖ 23 problems (4 errors, 19 warnings, 0 infos, 0 hints)