-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/fb v2 docs [SLT-476] #3402
Changes from 27 commits
0c5f4aa
b0d480f
d550bda
a7ff26a
3e8a2f3
b58347a
f1d1096
a5efffe
943dfca
e410e78
f029c30
d431bd9
5e6fa9b
ccdff29
4f82733
5d67690
0fd739b
aef5ab3
c6715e9
6fba9ec
d094a7d
7fdf0ef
1b5f039
72d3d1e
c68478b
d560457
928c01c
37e1f33
7691857
21c6c5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,244 @@ | ||
--- | ||
id: get-open-quote-requests | ||
title: "Get open quote requests" | ||
description: "Get all open quote requests that are currently in Received or Pending status." | ||
sidebar_label: "Get open quote requests" | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: eJytU01v2zAM/SsCz8pS7OhbD0MxDNiKfWGAERiMxNpqbUmh6LSG4f8+SE2WtvB22kkA+UQ+Pj7OYCkZdlFc8FDBDYnCvlchkleHMQgppsNISZKSDkUhkzIjM3npJ+W8+kqG3JGsCqxuyVvnW5UEZUzvQANTisEnSlDN8P7qKj+vO375BBo6QktcQL8219FtfhKnkn8Lv779qE5J9Xkc9sRqo74RKRtMUneB1RCYlPN3ATQk09GAuYpMkaCCJOx8C8uyaDDBC3nJWYyxdwZzj+19eu57+euEhsItcojE4p7HMUwoZBuUlQY685bGdOh84+wLhPNCLfEfiIQH8qsV6Ck6LqSaR+dteFyvEti1zjc4hNGvUzkh/k3mBPo7nTERN2gtU0prkupzJOzvyQhcAsiMUxa9gLBNUNVQ3JVgp2Eg6YKFCloS0BBROqhgmz3YFFRz9iBoKJvN6gcvaPK8uaaTPjcCDcezcyATiCHJgGUejwOdHL7ibtCvjTZf7PHfj+KkitCTbGOPzhd1uS8WK8PXsDb8TkMXkuT0PO8x0Q/ulyWHDyPxBFW903BEdrjPatS75XxZUNUzPNCUD8gYilnmI/ZjWc5b7y8vV3Lz4Tssy28PxXQw | ||
sidebar_class_name: "get api-method" | ||
custom_edit_url: null | ||
--- | ||
|
||
import ApiTabs from "@theme/ApiTabs"; | ||
import DiscriminatorTabs from "@theme/DiscriminatorTabs"; | ||
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; | ||
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; | ||
import MimeTabs from "@theme/MimeTabs"; | ||
import ParamsItem from "@theme/ParamsItem"; | ||
import ResponseSamples from "@theme/ResponseSamples"; | ||
import SchemaItem from "@theme/SchemaItem"; | ||
import SchemaTabs from "@theme/SchemaTabs"; | ||
import Heading from "@theme/Heading"; | ||
import OperationTabs from "@theme/OperationTabs"; | ||
import TabItem from "@theme/TabItem"; | ||
|
||
<Heading | ||
as={"h1"} | ||
className={"openapi__heading"} | ||
children={"Get open quote requests"} | ||
> | ||
</Heading> | ||
|
||
<MethodEndpoint | ||
method={"get"} | ||
path={"/open_quote_requests"} | ||
context={"endpoint"} | ||
> | ||
|
||
</MethodEndpoint> | ||
|
||
|
||
|
||
Get all open quote requests that are currently in Received or Pending status. | ||
|
||
<div> | ||
<div> | ||
<ApiTabs | ||
label={undefined} | ||
id={undefined} | ||
> | ||
<TabItem | ||
label={"200"} | ||
value={"200"} | ||
> | ||
<div> | ||
|
||
|
||
OK | ||
|
||
|
||
</div><details | ||
style={{"textAlign":"left","marginBottom":"1rem"}} | ||
className={"openapi-markdown__details"} | ||
data-collapsed={true} | ||
open={false} | ||
> | ||
<summary | ||
style={{}} | ||
> | ||
<strong> | ||
Response Headers | ||
</strong> | ||
</summary><ul | ||
style={{"marginLeft":"1rem"}} | ||
> | ||
<li | ||
className={"schemaItem"} | ||
> | ||
<summary | ||
style={{}} | ||
> | ||
<strong> | ||
X-Api-Version | ||
</strong><span | ||
style={{"opacity":"0.6"}} | ||
> | ||
string | ||
</span> | ||
</summary><div> | ||
<div | ||
style={{"marginTop":".5rem","marginBottom":".5rem"}} | ||
> | ||
|
||
|
||
API Version Number - See docs for more info | ||
|
||
|
||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
</details><div> | ||
<MimeTabs | ||
className={"openapi-tabs__mime"} | ||
schemaType={"response"} | ||
> | ||
<TabItem | ||
label={"application/json"} | ||
value={"application/json"} | ||
> | ||
<SchemaTabs | ||
className={"openapi-tabs__schema"} | ||
> | ||
<TabItem | ||
label={"Schema"} | ||
value={"Schema"} | ||
> | ||
<details | ||
style={{}} | ||
className={"openapi-markdown__details response"} | ||
data-collapsed={false} | ||
open={true} | ||
> | ||
<summary | ||
style={{}} | ||
className={"openapi-markdown__details-summary-response"} | ||
> | ||
<strong> | ||
Schema | ||
</strong> | ||
</summary><div | ||
style={{"textAlign":"left","marginLeft":"1rem"}} | ||
> | ||
|
||
</div><ul | ||
style={{"marginLeft":"1rem"}} | ||
> | ||
<li> | ||
<div | ||
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}} | ||
> | ||
Array [ | ||
</div> | ||
</li><SchemaItem | ||
collapsible={false} | ||
name={"created_at"} | ||
required={false} | ||
schemaName={"string"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"string"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"dest_chain_id"} | ||
required={false} | ||
schemaName={"integer"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"integer"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"dest_token"} | ||
required={false} | ||
schemaName={"string"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"string"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"expiration_window"} | ||
required={false} | ||
schemaName={"integer"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"integer"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"origin_amount"} | ||
required={false} | ||
schemaName={"string"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"string"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"origin_chain_id"} | ||
required={false} | ||
schemaName={"integer"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"integer"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"origin_token"} | ||
required={false} | ||
schemaName={"string"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"string"}} | ||
> | ||
|
||
</SchemaItem><SchemaItem | ||
collapsible={false} | ||
name={"user_address"} | ||
required={false} | ||
schemaName={"string"} | ||
qualifierMessage={undefined} | ||
schema={{"type":"string"}} | ||
> | ||
|
||
</SchemaItem><li> | ||
<div | ||
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}} | ||
> | ||
] | ||
</div> | ||
</li> | ||
</ul> | ||
Comment on lines
+144
to
+223
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Based on the codebase analysis, I can now provide a final response: Required fields should be marked as required in the API documentation The API documentation should mark the following fields as required (required=true) as they are essential for the quote request functionality:
This is evidenced by:
🔗 Analysis chainReview required fields in the response schema The response schema marks all fields as optional (required=false). Please verify if some fields should be marked as required, especially essential fields like:
Let me check the actual implementations to verify if these fields are required. Let me try a different approach to find the type definitions. Let me try one more search to find the quote request definitions. Let me check the actual API implementation file. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Search for field usage in the codebase
# Look for references to these fields in related files
rg -l "created_at|origin_chain_id|origin_token|origin_amount|user_address" --type ts --type js
Length of output: 266 Script: #!/bin/bash
# Check the quote type definitions and usage
ast-grep --pattern 'interface $_Quote {
$$$
}'
# Also check the actual API implementation
ast-grep --pattern 'type $_QuoteRequest = {
$$$
}'
Length of output: 105 Script: #!/bin/bash
# Search for type definitions in the quote-related files we found earlier
rg -A 20 "type.*Quote|interface.*Quote" packages/sdk-router/src/rfq/quote.ts
# Also check the API implementation
rg -A 20 "type.*QuoteRequest|interface.*QuoteRequest" packages/sdk-router/src/rfq/api.test.ts
Length of output: 904 Script: #!/bin/bash
# Search for quote request related content in the files
rg -A 10 "QuoteRequest|getOpenQuoteRequests" packages/sdk-router/src/rfq/quote.ts packages/sdk-router/src/rfq/api.test.ts
# Also check the API implementation file
cat packages/sdk-router/src/rfq/api.test.ts
Length of output: 3500 Script: #!/bin/bash
# Check the API implementation
cat packages/sdk-router/src/rfq/api.ts
# Also search for any OpenQuoteRequest type definitions
rg -A 10 "OpenQuoteRequest" --type ts
Length of output: 1533 |
||
</details> | ||
</TabItem><TabItem | ||
label={"Example (from schema)"} | ||
value={"Example (from schema)"} | ||
> | ||
<ResponseSamples | ||
responseExample={"[\n {\n \"created_at\": \"string\",\n \"dest_chain_id\": 0,\n \"dest_token\": \"string\",\n \"expiration_window\": 0,\n \"origin_amount\": \"string\",\n \"origin_chain_id\": 0,\n \"origin_token\": \"string\",\n \"user_address\": \"string\"\n }\n]"} | ||
language={"json"} | ||
> | ||
|
||
</ResponseSamples> | ||
</TabItem> | ||
</SchemaTabs> | ||
</TabItem> | ||
</MimeTabs> | ||
</div> | ||
</TabItem> | ||
</ApiTabs> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance the endpoint description
The current description is minimal. Consider adding:
Example enhancement: