-
Notifications
You must be signed in to change notification settings - Fork 49
API contract for OOO feature #249
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -70,7 +70,12 @@ Returns a list of requests with pagination and filtering options. | |||||||||||||
"state": "string", | ||||||||||||||
"updatedAt": "number" | ||||||||||||||
} | ||||||||||||||
// Additional request objects | ||||||||||||||
/* Additional request objects | ||||||||||||||
//NOTE : In case of dev=true the response would be send as above but in case of dev=false : | ||||||||||||||
message --> reason, | ||||||||||||||
state --> status, | ||||||||||||||
reason --> comment | ||||||||||||||
*/ | ||||||||||||||
Comment on lines
+73
to
+78
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. 🛠️ Refactor suggestion Remove invalid JSON comment and avoid schema changes behind a dev flag.
Apply this diff to keep the sample valid; move any notes outside the JSON code block: - /* Additional request objects
- //NOTE : In case of dev=true the response would be send as above but in case of dev=false :
- message --> reason,
- state --> status,
- reason --> comment
- */ Follow-up (outside this range): add a Markdown “Notes” subsection clarifying the single, canonical response schema and any deprecated aliases. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
], | ||||||||||||||
"next": "string", | ||||||||||||||
"prev": "string" | ||||||||||||||
|
@@ -133,8 +138,8 @@ Creates a new request. | |||||||||||||
- `type`: Required string to specify the type of request (e.g., OOO,EXTENSION,TASK). | ||||||||||||||
- `from`: Required number to specify the start timestamp of the request. | ||||||||||||||
- `until`: Required number to specify the end timestamp of the request. | ||||||||||||||
- `message`: Required string to specify the message for the request. | ||||||||||||||
- `state`: Required string to specify the state of the request (e.g., PENDING). | ||||||||||||||
- `reason`: Required string to specify the reason for the request. | ||||||||||||||
- `status`: Required string to specify the status of the request (e.g., PENDING). | ||||||||||||||
|
||||||||||||||
Comment on lines
+141
to
143
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. 🛠️ Refactor suggestion Do not require client-supplied status on create; align POST body with canonical fields. Creation should not accept - - `reason`: Required string to specify the reason for the request.
- - `status`: Required string to specify the status of the request (e.g., PENDING).
+ - `reason`: Required string to specify the reason for the request. Follow-up: update ALL request examples to stop using 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
- Example OOO Request: | ||||||||||||||
```json | ||||||||||||||
|
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.
There appears to be a field naming inconsistency in the API contract. The comment at lines 73-77 indicates that when
dev=false
, fields are mapped as:However, in the field documentation at lines 141-142,
reason
andstatus
are already defined as the primary field names for request creation.To maintain a clear API contract, please:
message
/state
orreason
/status
)This will help prevent confusion for developers implementing against this API.
Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.