Skip to content

Commit 40fea12

Browse files
authored
Generate docs for Statins sync resources (#5505)
**Story card:** [sc-14275](https://app.shortcut.com/simpledotorg/story/14275/generate-documentation-for-statins-routes) ## Because API docs don't exist for newly added statins sync resources ## This addresses Generating the API docs for statins ## Test instructions Check API docs
1 parent 34fe3ff commit 40fea12

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

app/schema/api/v4/models.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ def definitions
435435
blood_sugars: Api::CommonDefinitions.array_of("blood_sugar"),
436436
call_result: call_result,
437437
call_results: Api::CommonDefinitions.array_of("call_result"),
438+
cvd_risk: cvd_risk,
438439
drug_stock: drug_stock,
439440
facility_medical_officer: facility_medical_officer,
440441
facility_medical_officers: Api::CommonDefinitions.array_of("facility_medical_officer"),

swagger/v3/swagger.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,14 @@
24812481
"unknown"
24822482
]
24832483
},
2484+
"smoking": {
2485+
"type": "string",
2486+
"enum": [
2487+
"yes",
2488+
"no",
2489+
"unknown"
2490+
]
2491+
},
24842492
"deleted_at": {
24852493
"$ref": "#/definitions/nullable_timestamp"
24862494
},

swagger/v4/swagger.json

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,33 @@
16261626
"$ref": "#/definitions/call_result"
16271627
}
16281628
},
1629+
"cvd_risk": {
1630+
"type": "object",
1631+
"properties": {
1632+
"id": {
1633+
"$ref": "#/definitions/uuid"
1634+
},
1635+
"patient_id": {
1636+
"$ref": "#/definitions/uuid"
1637+
},
1638+
"risk_score": {
1639+
"type": "number"
1640+
},
1641+
"created_at": {
1642+
"$ref": "#/definitions/timestamp"
1643+
},
1644+
"updated_at": {
1645+
"$ref": "#/definitions/timestamp"
1646+
}
1647+
},
1648+
"required": [
1649+
"id",
1650+
"risk_score",
1651+
"created_at",
1652+
"updated_at",
1653+
"patient_id"
1654+
]
1655+
},
16291656
"drug_stock": {
16301657
"type": "object",
16311658
"properties": {
@@ -1959,6 +1986,14 @@
19591986
"unknown"
19601987
]
19611988
},
1989+
"smoking": {
1990+
"type": "string",
1991+
"enum": [
1992+
"yes",
1993+
"no",
1994+
"unknown"
1995+
]
1996+
},
19621997
"deleted_at": {
19631998
"$ref": "#/definitions/nullable_timestamp"
19641999
},
@@ -2560,6 +2595,43 @@
25602595
}
25612596
}
25622597
},
2598+
"patient_attribute": {
2599+
"type": "object",
2600+
"properties": {
2601+
"id": {
2602+
"$ref": "#/definitions/uuid"
2603+
},
2604+
"user_id": {
2605+
"$ref": "#/definitions/uuid"
2606+
},
2607+
"patient_id": {
2608+
"$ref": "#/definitions/uuid"
2609+
},
2610+
"height": {
2611+
"$ref": "#/definitions/non_empty_string"
2612+
},
2613+
"weight": {
2614+
"$ref": "#/definitions/non_empty_string"
2615+
},
2616+
"deleted_at": {
2617+
"$ref": "#/definitions/nullable_timestamp"
2618+
},
2619+
"created_at": {
2620+
"$ref": "#/definitions/timestamp"
2621+
},
2622+
"updated_at": {
2623+
"$ref": "#/definitions/timestamp"
2624+
}
2625+
},
2626+
"required": [
2627+
"id",
2628+
"patient_id",
2629+
"height",
2630+
"weight",
2631+
"created_at",
2632+
"updated_at"
2633+
]
2634+
},
25632635
"patient_business_identifier": {
25642636
"type": "object",
25652637
"properties": {
@@ -4023,4 +4095,4 @@
40234095
"name": "X-PATIENT-ID"
40244096
}
40254097
}
4026-
}
4098+
}

0 commit comments

Comments
 (0)