Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 06115eb

Browse files
cachelinagithub-actions[bot]SMLuthi
authored
Ce 12630 remove cache appointments api (#27351)
* fix: remove use_cache from #index, and the contract * fix: remove use_cache from postman collection for /v0/appointment endpoint * Auto-generate openapi.json from openapi.yaml --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: SMLuthi <silvio@themostudio.com>
1 parent 5490f00 commit 06115eb

5 files changed

Lines changed: 1 addition & 24 deletions

File tree

modules/mobile/app/controllers/mobile/v0/appointments_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def build_page_metadata(page_meta_data, appointments, partial_errors)
7575

7676
def validated_params
7777
@validated_params ||= begin
78-
use_cache = params[:useCache] || true
7978
start_date = params[:startDate] || DateTime.now.utc.to_datetime
8079
end_date = params[:endDate] || 1.month.from_now.end_of_day.to_datetime
8180
reverse_sort = !(params[:sort] =~ /-startDateUtc/).nil?
@@ -85,7 +84,6 @@ def validated_params
8584
end_date:,
8685
page_number: params.dig(:page, :number),
8786
page_size: params.dig(:page, :size),
88-
use_cache:,
8987
reverse_sort:,
9088
included: params[:included],
9189
include: params[:include]

modules/mobile/app/models/mobile/v0/contracts/appointments.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module V0
55
module Contracts
66
class Appointments < PaginationBase
77
params(Schemas::DateRangeSchema) do
8-
optional(:use_cache).maybe(:bool, :filled?)
98
optional(:reverse_sort).maybe(:bool, :filled?)
109
optional(:included).maybe(:array, :filled?)
1110
optional(:include).maybe(:array, :filled?)

modules/mobile/docs/openapi.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,6 @@
360360
"type": "integer"
361361
}
362362
},
363-
{
364-
"description": "Whether or not to use this API's cache or fetch records from the upstream service",
365-
"example": true,
366-
"in": "query",
367-
"name": "useCache",
368-
"schema": {
369-
"type": "boolean"
370-
}
371-
},
372363
{
373364
"description": "Field to sort the appointments list by. Currently only supports `startDateUtc`. Prefixing `-` reverses the sort.",
374365
"example": "-startDateUtc",

modules/mobile/docs/openapi.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,6 @@ paths:
143143
name: page[size]
144144
schema:
145145
type: integer
146-
- description: Whether or not to use this API's cache or fetch records from
147-
the upstream service
148-
example: true
149-
in: query
150-
name: useCache
151-
schema:
152-
type: boolean
153146
- description: Field to sort the appointments list by. Currently only supports
154147
`startDateUtc`. Prefixing `-` reverses the sort.
155148
example: -startDateUtc

modules/mobile/docs/postman/postman/collections/Mobile Endpoints.postman_collection.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
],
6363
"url": {
64-
"raw": "{{BaseUrl}}/mobile/v0/appointments?include[]=pending&page[size]=900&useCache=false",
64+
"raw": "{{BaseUrl}}/mobile/v0/appointments?include[]=pending&page[size]=900",
6565
"host": [
6666
"{{BaseUrl}}"
6767
],
@@ -79,10 +79,6 @@
7979
"key": "page[size]",
8080
"value": "900"
8181
},
82-
{
83-
"key": "useCache",
84-
"value": "false"
85-
},
8682
{
8783
"key": "startDate",
8884
"value": "2025-04-17T00:00:00.000-06:00",

0 commit comments

Comments
 (0)