feat: allow editing frequency and target_value on habits
- Add frequency to UpdateHabitRequest (was immutable, now editable) - Validate frequency + specific_days/dates coherence on update - Keep type and is_negative immutable (they change entry semantics) - Remove completion_rate references from swagger and README
This commit is contained in:
+4
-1
@@ -1172,7 +1172,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get statistics for a specific habit including streaks and completion rates",
|
||||
"description": "Get statistics for a specific habit including streaks and completions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1800,6 +1800,9 @@ const docTemplate = `{
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"frequency": {
|
||||
"$ref": "#/definitions/value_objects.Frequency"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
+4
-1
@@ -1164,7 +1164,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get statistics for a specific habit including streaks and completion rates",
|
||||
"description": "Get statistics for a specific habit including streaks and completions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1792,6 +1792,9 @@
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"frequency": {
|
||||
"$ref": "#/definitions/value_objects.Frequency"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
+3
-2
@@ -268,6 +268,8 @@ definitions:
|
||||
type: boolean
|
||||
description:
|
||||
type: string
|
||||
frequency:
|
||||
$ref: '#/definitions/value_objects.Frequency'
|
||||
name:
|
||||
type: string
|
||||
specific_dates:
|
||||
@@ -1189,8 +1191,7 @@ paths:
|
||||
- system
|
||||
/stats/habits/{id}:
|
||||
get:
|
||||
description: Get statistics for a specific habit including streaks and completion
|
||||
rates
|
||||
description: Get statistics for a specific habit including streaks and completions
|
||||
parameters:
|
||||
- description: Habit ID
|
||||
in: path
|
||||
|
||||
Reference in New Issue
Block a user