Repository navigation
Expand file tree
/
Copy pathredocly.yaml
More file actions
64 lines (60 loc) · 2.22 KB
/
Copy pathredocly.yaml
File metadata and controls
64 lines (60 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Lint for OpenBot's API specs: the REST API (api/openapi.yaml, OpenAPI) and the live channels
# (api/asyncapi.yaml, AsyncAPI). Run with `bun run api:lint`; CI runs the same command.
#
# Redocly's recommended rules, every warning raised to an error so a pull request cannot add one, plus
# OpenBot's own conventions (api/redocly/rules.mjs), which are CopilotKit Intelligence's v2 conventions
# so the two read as one API.
apis:
openbot:
root: api/openapi.yaml
# The WebSocket channels. Redocly checks the file against the AsyncAPI 3.1 schema, WebSocket
# bindings included, and that every reference resolves; the rules below are the AsyncAPI ones.
# The OpenAPI rules further down only ever run on an OpenAPI file.
openbot-live:
root: api/asyncapi.yaml
rules:
channels-kebab-case: error
no-channel-trailing-slash: error
plugins:
- ./api/redocly/rules.mjs
extends:
- recommended-strict
rules:
# OpenBot's conventions. See api/redocly/rules.mjs for what each one checks and why.
openbot/openapi-3-1: error
openbot/organization-scoped: error
openbot/no-intelligence-collision: error
openbot/problem-details-errors: error
openbot/idempotency-key-on-writes: error
openbot/cursor-paging: error
# Every operation names who may call it, has a stable camelCase id a generated client is named from,
# and says what it does.
security-defined: error
operation-operationId: error
operation-operationId-unique: error
operation-summary: error
operation-description: error
rule/operation-id-camel-case:
subject:
type: Operation
property: operationId
assertions:
casing: camelCase
message: operationId must be camelCase, like listBots.
severity: error
operation-4xx-response: error
operation-2xx-response: error
no-unused-components: error
no-invalid-media-type-examples: error
no-invalid-parameter-examples: error
component-name-unique: error
paths-kebab-case: error
no-ambiguous-paths: error
path-not-include-query: error
# Whole words only: a verb inside a word ("put" in computers) is not a verb in the path.
no-http-verbs-in-paths:
severity: error
splitIntoWords: true
tag-description: error
info-license: error
info-license-strict: error