-
Notifications
You must be signed in to change notification settings - Fork 46
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
docs: Updated docs for Cardinal v1.7.1 #814
base: main
Are you sure you want to change the base?
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “graphite/merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
WalkthroughThe changes include updates to the API reference documentation for the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant API
participant Database
User->>API: Send Transaction Request
API->>Database: Validate and Process Request
Database-->>API: Return Transaction Result
API-->>User: Send Response with Result
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Preview InstructionsTo preview these changes locally, checkout this branch and run:
|
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.
Actionable comments posted: 2
🧹 Outside diff range comments (4)
docs/cardinal/openapi.json (4)
Line range hint
424-440
: Add example values for the timestamp fieldThe
timestamp
field has been correctly added to replacenonce
in both transaction request schemas. However, it would be helpful to add example values to demonstrate the expected unix millisecond timestamp format.Add examples like this:
"timestamp": { "type": "integer", - "format": "unix millisecond timestamp" + "format": "unix millisecond timestamp", + "example": 1699564800000 }Also applies to: 542-558
Line range hint
424-440
: Enhance CQLResponse schema definitionThe CQLResponse schema is currently defined as a simple array of objects, but the example response in the
/query/game/cql
endpoint shows a more specific structure withid
anddata
fields.Consider updating the schema to match the example response:
"CQLResponse": { "type": "array", "items": { - "type": "object" + "type": "object", + "required": ["id", "data"], + "properties": { + "id": { + "type": "integer", + "description": "Entity identifier" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "description": "Component data" + } + } + } } }
Line range hint
477-499
: Define possible values for the status fieldThe
status
field in QueryPersonaSignerResponse should enumerate its possible values to help API consumers understand the expected responses.Consider updating the schema:
"status": { - "type": "string" + "type": "string", + "enum": ["active", "inactive", "pending"], + "description": "Current status of the persona signer" }Note: Please adjust the enum values according to the actual possible statuses in your implementation.
Line range hint
570-605
: Consider adding pagination parametersThe transaction receipts endpoint might return large sets of data when querying across many ticks. Consider adding pagination support to manage response sizes effectively.
Consider updating the request schema:
"ListTxReceiptsRequest": { "required": [ "startTick" ], "type": "object", "properties": { "startTick": { "type": "integer", "format": "int64" }, + "limit": { + "type": "integer", + "description": "Maximum number of receipts to return", + "default": 100, + "minimum": 1, + "maximum": 1000 + } } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (2)
docs/cardinal/game/world/api-reference.mdx
(1 hunks)docs/cardinal/openapi.json
(4 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cardinal/game/world/api-reference.mdx
[uncategorized] ~146-~146: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... is used. NOTE: this means that the real time clock for the sender and receiver must ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
Preview InstructionsTo preview these changes locally, checkout this branch and run:
|
@ezavada can you resolve the conflict here |
Overview
This pull request improves documentation by adding info on new Options in Cardinal v1.7.1 and by changing references to
nonce
in the REST API documentation to the newtimestamp
field.Summary by CodeRabbit
New Features
World
object:WithMessageExpiration
for message lifespan (default 10 seconds).WithHashCacheSize
for setting hash cache size (default 1024 kilobytes).CQLRequest
,CQLResponse
, andListTxReceiptsRequest
.Updates
nonce
totimestamp
in transaction request schemas, changing format to "unix millisecond timestamp".