Skip to content

Commit 64c3ada

Browse files
authored
Fixes API query param names (Netflix#922)
* Fixes API query param names * Updates field names on the JS side * Reverts some changes
1 parent 772014f commit 64c3ada

File tree

15 files changed

+48
-48
lines changed

15 files changed

+48
-48
lines changed

src/dispatch/auth/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def get_users(
3030
query_str: str = Query(None, alias="q"),
3131
sort_by: List[str] = Query([], alias="sortBy[]"),
3232
descending: List[bool] = Query([], alias="descending[]"),
33-
fields: List[str] = Query([], alias="field[]"),
34-
ops: List[str] = Query([], alias="op[]"),
35-
values: List[str] = Query([], alias="value[]"),
33+
fields: List[str] = Query([], alias="fields[]"),
34+
ops: List[str] = Query([], alias="ops[]"),
35+
values: List[str] = Query([], alias="values[]"),
3636
):
3737
"""
3838
Get all users.

src/dispatch/document/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def get_documents(
1919
query_str: str = Query(None, alias="q"),
2020
sort_by: List[str] = Query([], alias="sortBy[]"),
2121
descending: List[bool] = Query([], alias="descending[]"),
22-
fields: List[str] = Query([], alias="field[]"),
23-
ops: List[str] = Query([], alias="op[]"),
24-
values: List[str] = Query([], alias="value[]"),
22+
fields: List[str] = Query([], alias="fields[]"),
23+
ops: List[str] = Query([], alias="ops[]"),
24+
values: List[str] = Query([], alias="values[]"),
2525
):
2626
"""
2727
Get all documents.

src/dispatch/feedback/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def get_feedback_entries(
2525
query_str: str = Query(None, alias="q"),
2626
sort_by: List[str] = Query([], alias="sortBy[]"),
2727
descending: List[bool] = Query([], alias="descending[]"),
28-
fields: List[str] = Query([], alias="field[]"),
29-
ops: List[str] = Query([], alias="op[]"),
30-
values: List[str] = Query([], alias="value[]"),
28+
fields: List[str] = Query([], alias="fields[]"),
29+
ops: List[str] = Query([], alias="ops[]"),
30+
values: List[str] = Query([], alias="values[]"),
3131
):
3232
"""
3333
Get all feedback entries, or only those matching a given search term.

src/dispatch/incident_priority/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def get_incident_priorities(
2626
query_str: str = Query(None, alias="q"),
2727
sort_by: List[str] = Query([], alias="sortBy[]"),
2828
descending: List[bool] = Query([], alias="descending[]"),
29-
fields: List[str] = Query([], alias="field[]"),
30-
ops: List[str] = Query([], alias="op[]"),
31-
values: List[str] = Query([], alias="value[]"),
29+
fields: List[str] = Query([], alias="fields[]"),
30+
ops: List[str] = Query([], alias="ops[]"),
31+
values: List[str] = Query([], alias="values[]"),
3232
):
3333
"""
3434
Returns all incident priorities.

src/dispatch/individual/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def get_individuals(
2424
query_str: str = Query(None, alias="q"),
2525
sort_by: List[str] = Query([], alias="sortBy[]"),
2626
descending: List[bool] = Query([], alias="descending[]"),
27-
fields: List[str] = Query([], alias="field[]"),
28-
ops: List[str] = Query([], alias="op[]"),
29-
values: List[str] = Query([], alias="value[]"),
27+
fields: List[str] = Query([], alias="fields[]"),
28+
ops: List[str] = Query([], alias="ops[]"),
29+
values: List[str] = Query([], alias="values[]"),
3030
):
3131
"""
3232
Retrieve individual contacts.

src/dispatch/notification/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def get_notifications(
2626
query_str: str = Query(None, alias="q"),
2727
sort_by: List[str] = Query([], alias="sortBy[]"),
2828
descending: List[bool] = Query([], alias="descending[]"),
29-
fields: List[str] = Query([], alias="field[]"),
30-
ops: List[str] = Query([], alias="op[]"),
31-
values: List[str] = Query([], alias="value[]"),
29+
fields: List[str] = Query([], alias="fields[]"),
30+
ops: List[str] = Query([], alias="ops[]"),
31+
values: List[str] = Query([], alias="values[]"),
3232
):
3333
"""
3434
Get all notifications, or only those matching a given search term.

src/dispatch/plugin/views.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def get_plugins(
2222
query_str: str = Query(None, alias="q"),
2323
sort_by: List[str] = Query([], alias="sortBy[]"),
2424
descending: List[bool] = Query([], alias="descending[]"),
25-
fields: List[str] = Query([], alias="field[]"),
26-
ops: List[str] = Query([], alias="op[]"),
27-
values: List[str] = Query([], alias="value[]"),
25+
fields: List[str] = Query([], alias="fields[]"),
26+
ops: List[str] = Query([], alias="ops[]"),
27+
values: List[str] = Query([], alias="values[]"),
2828
):
2929
"""
3030
Get all plugins.
@@ -52,9 +52,9 @@ def get_plugins_by_type(
5252
query_str: str = Query(None, alias="q"),
5353
sort_by: List[str] = Query([], alias="sortBy[]"),
5454
descending: List[bool] = Query([], alias="descending[]"),
55-
fields: List[str] = Query([], alias="field[]"),
56-
ops: List[str] = Query([], alias="op[]"),
57-
values: List[str] = Query([], alias="value[]"),
55+
fields: List[str] = Query([], alias="fields[]"),
56+
ops: List[str] = Query([], alias="ops[]"),
57+
values: List[str] = Query([], alias="values[]"),
5858
):
5959
"""
6060
Get all plugins by type.

src/dispatch/search/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def get_filters(
6161
query_str: str = Query(None, alias="q"),
6262
sort_by: List[str] = Query([], alias="sortBy[]"),
6363
descending: List[bool] = Query([], alias="descending[]"),
64-
fields: List[str] = Query([], alias="field[]"),
65-
ops: List[str] = Query([], alias="op[]"),
66-
values: List[str] = Query([], alias="value[]"),
64+
fields: List[str] = Query([], alias="fields[]"),
65+
ops: List[str] = Query([], alias="ops[]"),
66+
values: List[str] = Query([], alias="values[]"),
6767
):
6868
"""
6969
Retrieve filters.

src/dispatch/service/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def get_services(
2121
query_str: str = Query(None, alias="q"),
2222
sort_by: List[str] = Query([], alias="sortBy[]"),
2323
descending: List[bool] = Query([], alias="descending[]"),
24-
fields: List[str] = Query([], alias="field[]"),
25-
ops: List[str] = Query([], alias="op[]"),
26-
values: List[str] = Query([], alias="value[]"),
24+
fields: List[str] = Query([], alias="fields[]"),
25+
ops: List[str] = Query([], alias="ops[]"),
26+
values: List[str] = Query([], alias="values[]"),
2727
):
2828
"""
2929
Retrieve all services.

src/dispatch/static/dispatch/src/plugin/PluginCombobox.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ export default {
9999
if (this.type) {
100100
// Add type filtering
101101
Object.assign(filterOptions, {
102-
"field[]": "type",
103-
"op[]": "==",
104-
"value[]": this.type
102+
"fields[]": "type",
103+
"ops[]": "==",
104+
"values[]": this.type
105105
})
106106
}
107107

src/dispatch/tag/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def get_tags(
2424
query_str: str = Query(None, alias="q"),
2525
sort_by: List[str] = Query([], alias="sortBy[]"),
2626
descending: List[bool] = Query([], alias="descending[]"),
27-
fields: List[str] = Query([], alias="field[]"),
28-
ops: List[str] = Query([], alias="op[]"),
29-
values: List[str] = Query([], alias="value[]"),
27+
fields: List[str] = Query([], alias="fields[]"),
28+
ops: List[str] = Query([], alias="ops[]"),
29+
values: List[str] = Query([], alias="values[]"),
3030
):
3131
"""
3232
Get all tags, or only those matching a given search term.

src/dispatch/tag_type/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def get_tag_types(
2424
query_str: str = Query(None, alias="q"),
2525
sort_by: List[str] = Query([], alias="sortBy[]"),
2626
descending: List[bool] = Query([], alias="descending[]"),
27-
fields: List[str] = Query([], alias="field[]"),
28-
ops: List[str] = Query([], alias="op[]"),
29-
values: List[str] = Query([], alias="value[]"),
27+
fields: List[str] = Query([], alias="fields[]"),
28+
ops: List[str] = Query([], alias="ops[]"),
29+
values: List[str] = Query([], alias="values[]"),
3030
):
3131
"""
3232
Get all tag types, or only those matching a given search term.

src/dispatch/team/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def get_teams(
2424
query_str: str = Query(None, alias="q"),
2525
sort_by: List[str] = Query([], alias="sortBy[]"),
2626
descending: List[bool] = Query([], alias="descending[]"),
27-
fields: List[str] = Query([], alias="field[]"),
28-
ops: List[str] = Query([], alias="op[]"),
29-
values: List[str] = Query([], alias="value[]"),
27+
fields: List[str] = Query([], alias="fields[]"),
28+
ops: List[str] = Query([], alias="ops[]"),
29+
values: List[str] = Query([], alias="values[]"),
3030
):
3131
"""
3232
Get all team contacts.

src/dispatch/term/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def get_terms(
1919
query_str: str = Query(None, alias="q"),
2020
sort_by: List[str] = Query([], alias="sortBy[]"),
2121
descending: List[bool] = Query([], alias="descending[]"),
22-
fields: List[str] = Query([], alias="field[]"),
23-
ops: List[str] = Query([], alias="op[]"),
24-
values: List[str] = Query([], alias="value[]"),
22+
fields: List[str] = Query([], alias="fields[]"),
23+
ops: List[str] = Query([], alias="ops[]"),
24+
values: List[str] = Query([], alias="values[]"),
2525
):
2626
"""
2727
Retrieve all terms.

src/dispatch/workflow/views.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def get_workflows(
1919
query_str: str = Query(None, alias="q"),
2020
sort_by: List[str] = Query([], alias="sortBy[]"),
2121
descending: List[bool] = Query([], alias="descending[]"),
22-
fields: List[str] = Query([], alias="field[]"),
23-
ops: List[str] = Query([], alias="op[]"),
24-
values: List[str] = Query([], alias="value[]"),
22+
fields: List[str] = Query([], alias="fields[]"),
23+
ops: List[str] = Query([], alias="ops[]"),
24+
values: List[str] = Query([], alias="values[]"),
2525
):
2626
"""
2727
Get all workflows.

0 commit comments

Comments
 (0)