Skip to content

Commit 8a366a2

Browse files
author
Kapil Gowru
committed
Merge remote-tracking branch 'origin/main' into fix-redirects
2 parents 0ba536f + 26c8969 commit 8a366a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1897
-1392
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
docs: FAI Document API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /document
9+
endpoints:
10+
createDocument:
11+
docs: Index a document for a given domain
12+
path: /{domain}/create
13+
method: POST
14+
audiences:
15+
- customers
16+
path-parameters:
17+
domain: string
18+
request:
19+
name: IndexDocumentRequest
20+
body:
21+
properties:
22+
document:
23+
type: string
24+
docs: The content of the document that will be returned in the tool response
25+
chunk:
26+
type: optional<string>
27+
docs: The chunk of the document that will be indexed as a vector. If not provided, the document will be indexed.
28+
title:
29+
type: optional<string>
30+
docs: The title of the document
31+
url:
32+
type: optional<string>
33+
docs: The url of the document
34+
version:
35+
type: optional<string>
36+
docs: The version of the document
37+
keywords:
38+
type: optional<list<string>>
39+
docs: The keywords of the document
40+
authed:
41+
type: optional<boolean>
42+
docs: Whether the document is authed
43+
response: CreateDocumentResponse
44+
errors:
45+
- commons.BadRequestError
46+
- commons.InternalError
47+
48+
getDocumentById:
49+
docs: Get a document for a given domain
50+
path: /{domain}/{document_id}
51+
method: GET
52+
audiences:
53+
- customers
54+
path-parameters:
55+
domain: string
56+
document_id: string
57+
response: Document
58+
errors:
59+
- commons.BadRequestError
60+
- commons.InternalError
61+
62+
types:
63+
CreateDocumentResponse:
64+
properties:
65+
document_id: string
66+
67+
Document:
68+
properties:
69+
document_id: string
70+
chunk: string
71+
domain: string
72+
document: string
73+
title: optional<string>
74+
url: optional<string>
75+
version: optional<string>
76+
keywords: optional<list<string>>
77+
authed: optional<boolean>
78+
created_at: datetime
79+
updated_at: datetime
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
docs: FAI Guidance API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /guidance
9+
endpoints:
10+
createGuidance:
11+
docs: Index a guidance document for a given domain
12+
path: /{domain}/create
13+
method: POST
14+
audiences:
15+
- customers
16+
path-parameters:
17+
domain: string
18+
request:
19+
name: IndexGuidanceRequest
20+
body:
21+
properties:
22+
context:
23+
type: list<string>
24+
docs: The context of the guidance document, as a list of strings, that will be indexed.
25+
document:
26+
type: string
27+
docs: The content of the guidance document that will be returned in the tool response
28+
errors:
29+
- commons.BadRequestError
30+
- commons.InternalError
31+
32+
updateGuidanceById:
33+
docs: Update a guidance document for a given domain
34+
path: /{domain}/{guidance_id}
35+
method: PATCH
36+
audiences:
37+
- customers
38+
path-parameters:
39+
domain: string
40+
guidance_id: string
41+
request:
42+
name: UpdateGuidanceRequest
43+
body:
44+
properties:
45+
context:
46+
type: list<string>
47+
docs: The context of the document, as a list of strings, that will be indexed.
48+
document:
49+
type: string
50+
docs: The content of the document that will be returned in the tool response. If not provided, the document will be removed from the index.
51+
response: Guidance
52+
errors:
53+
- commons.BadRequestError
54+
- commons.InternalError
55+
56+
deleteGuidanceById:
57+
docs: Delete a guidance document for a given domain
58+
path: /{domain}/{guidance_id}
59+
method: DELETE
60+
audiences:
61+
- customers
62+
path-parameters:
63+
domain: string
64+
guidance_id: string
65+
errors:
66+
- commons.BadRequestError
67+
- commons.InternalError
68+
69+
getGuidanceById:
70+
docs: Get a guidance document for a given domain
71+
path: /{domain}/{guidance_id}
72+
method: GET
73+
audiences:
74+
- customers
75+
path-parameters:
76+
domain: string
77+
guidance_id: string
78+
response: Guidance
79+
errors:
80+
- commons.BadRequestError
81+
- commons.InternalError
82+
83+
getGuidances:
84+
docs: Retrieve all paginated guidance documents for a given domain
85+
path: /{domain}
86+
method: GET
87+
audiences:
88+
- customers
89+
path-parameters:
90+
domain:
91+
type: string
92+
docs: The domain to retrieve documents for
93+
request:
94+
name: GetGuidancesRequest
95+
query-parameters:
96+
page: optional<integer>
97+
limit: optional<integer>
98+
response: GuidanceList
99+
errors:
100+
- commons.BadRequestError
101+
- commons.InternalError
102+
103+
types:
104+
Guidance:
105+
properties:
106+
guidance_id: string
107+
context: list<string>
108+
domain: string
109+
document: string
110+
created_at: datetime
111+
updated_at: datetime
112+
113+
GuidanceList:
114+
properties:
115+
guidances: list<Guidance>
116+
pagination: Pagination
117+
118+
Pagination:
119+
properties:
120+
total: integer
121+
page: integer
122+
limit: integer

fern/docs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,18 @@ redirects:
587587
permanent: true
588588
- source: /learn/fern-definition/:slug*
589589
destination: /learn/api-definitions/ferndef/:slug*
590+
permanent: true
591+
592+
# Redirect old others.mdx extension pages to overview pages
593+
- source: /learn/api-definitions/openapi/extensions/others
594+
destination: /learn/api-definitions/openapi/extensions/overview
595+
permanent: true
596+
- source: /learn/api-definitions/asyncapi/extensions/others
597+
destination: /learn/api-definitions/asyncapi/extensions/overview
598+
permanent: true
599+
- source: /learn/api-definitions/openrpc/extensions/others
600+
destination: /learn/api-definitions/openrpc/extensions/overview
601+
permanent: true
602+
- source: /learn/api-definitions/grpc/extensions/others
603+
destination: /learn/api-definitions/grpc/extensions/overview
590604
permanent: true

0 commit comments

Comments
 (0)