Skip to content
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

[Ingest Manager] Remove success: true as top-level API response #73223

Merged
merged 22 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
666eaf6
Big bang commit removing top-level success property in API response
Jul 25, 2020
79aa8f5
Remove success property from mocks
Jul 25, 2020
f1100e9
Merge branch 'master' into 73221-remove-success
elasticmachine Jul 28, 2020
6a5507e
Merge branch 'master' into 73221-remove-success
elasticmachine Jul 28, 2020
13be0ed
Merge branch 'master' into 73221-remove-success
elasticmachine Jul 29, 2020
3b3f719
Merge branch 'master' into 73221-remove-success
elasticmachine Jul 29, 2020
6b12840
Merge branch 'master' into 73221-remove-success
elasticmachine Jul 29, 2020
d75323c
Resolve conflict from upstream changes
Aug 5, 2020
4ecbb85
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 5, 2020
c536b0e
Remove success property (after upstream merge)
Aug 5, 2020
189e3f7
Remove more 'success'es after merging in upstream
Aug 5, 2020
d506cb3
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 10, 2020
911eee3
Merge branch 'master' into 73221-remove-success
Aug 13, 2020
663cbc7
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 18, 2020
a087a7f
Merge branch 'master' into 73221-remove-success
Aug 26, 2020
033fb78
Remove success from some tests
Aug 27, 2020
92e7cf1
Remove success from OpenAPI spec
Aug 27, 2020
1546bef
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 27, 2020
dfccf25
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 27, 2020
58727a5
Merge branch 'master' into 73221-remove-success
elasticmachine Aug 31, 2020
b43aff0
Revert prior try/catch. Use res.ok
Aug 31, 2020
a29e9f5
Merge branch 'master' into 73221-remove-success
elasticmachine Sep 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 19 additions & 75 deletions x-pack/plugins/ingest_manager/common/openapi/spec_oas3.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@
},
"perPage": {
"type": "number"
},
"success": {
"type": "boolean"
}
},
"required": ["items", "total", "page", "perPage", "success"]
"required": ["items", "total", "page", "perPage"]
},
"examples": {
"success": {
Expand All @@ -71,8 +68,7 @@
],
"total": 1,
"page": 1,
"perPage": 50,
"success": true
"perPage": 50
}
}
}
Expand Down Expand Up @@ -107,9 +103,6 @@
"properties": {
"item": {
"$ref": "#/components/schemas/AgentPolicy"
},
"success": {
"type": "boolean"
}
}
}
Expand Down Expand Up @@ -159,12 +152,9 @@
"properties": {
"item": {
"$ref": "#/components/schemas/AgentPolicy"
},
"success": {
"type": "boolean"
}
},
"required": ["item", "success"]
"required": ["item"]
},
"examples": {
"success": {
Expand Down Expand Up @@ -707,8 +697,7 @@
"revision": 2,
"updated_on": "2020-05-06T17:32:21.905Z",
"updated_by": "system"
},
"success": true
}
}
}
}
Expand All @@ -733,12 +722,9 @@
"properties": {
"item": {
"$ref": "#/components/schemas/AgentPolicy"
},
"success": {
"type": "boolean"
}
},
"required": ["item", "success"]
"required": ["item"]
},
"examples": {
"example-1": {
Expand All @@ -751,8 +737,7 @@
"updated_on": "Fri Feb 28 2020 16:22:31 GMT-0500 (Eastern Standard Time)",
"updated_by": "elastic",
"packagePolicies": []
},
"success": true
}
}
}
}
Expand Down Expand Up @@ -810,12 +795,9 @@
"properties": {
"item": {
"$ref": "#/components/schemas/AgentPolicy"
},
"success": {
"type": "boolean"
}
},
"required": ["item", "success"]
"required": ["item"]
}
}
}
Expand Down Expand Up @@ -948,12 +930,9 @@
},
"perPage": {
"type": "number"
},
"success": {
"type": "boolean"
}
},
"required": ["items", "success"]
"required": ["items"]
},
"examples": {
"example-1": {
Expand Down Expand Up @@ -1157,8 +1136,7 @@
],
"total": 6,
"page": 1,
"perPage": 20,
"success": true
"perPage": 20
}
}
}
Expand Down Expand Up @@ -1251,12 +1229,9 @@
"properties": {
"item": {
"$ref": "#/components/schemas/PackagePolicy"
},
"success": {
"type": "boolean"
}
},
"required": ["item", "success"]
"required": ["item"]
}
}
}
Expand Down Expand Up @@ -1415,9 +1390,6 @@
"properties": {
"response": {
"$ref": "#/components/schemas/PackageInfo"
},
"success": {
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -1709,8 +1681,7 @@
},
"references": []
}
},
"success": true
}
}
},
"required-package": {
Expand Down Expand Up @@ -1899,8 +1870,7 @@
},
"references": []
}
},
"success": true
}
}
}
}
Expand Down Expand Up @@ -1950,12 +1920,9 @@
},
"required": ["id", "type"]
}
},
"success": {
"type": "boolean"
}
},
"required": ["response", "success"]
"required": ["response"]
}
}
}
Expand Down Expand Up @@ -1994,12 +1961,9 @@
},
"required": ["id", "type"]
}
},
"success": {
"type": "boolean"
}
},
"required": ["response", "success"]
"required": ["response"]
}
}
}
Expand Down Expand Up @@ -2678,8 +2642,7 @@
"version": "1.0.0",
"status": "not_installed"
}
],
"success": true
]
}
}
}
Expand Down Expand Up @@ -2743,9 +2706,6 @@
"type": "object"
}
},
"success": {
"type": "boolean"
},
"total": {
"type": "number"
},
Expand All @@ -2756,7 +2716,7 @@
"type": "number"
}
},
"required": ["list", "success", "total", "page", "perPage"]
"required": ["list", "total", "page", "perPage"]
},
"examples": {
"example-1": {
Expand Down Expand Up @@ -2793,7 +2753,6 @@
"status": "online"
}
],
"success": true,
"total": 1,
"page": 1,
"perPage": 20
Expand Down Expand Up @@ -2836,12 +2795,9 @@
"properties": {
"item": {
"type": "object"
},
"success": {
"type": "string"
}
},
"required": ["item", "success"]
"required": ["item"]
}
}
}
Expand Down Expand Up @@ -2916,9 +2872,6 @@
"type": "string",
"enum": ["checkin"]
},
"success": {
"type": "string"
},
"actions": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2950,7 +2903,6 @@
"success": {
"value": {
"action": "checkin",
"success": true,
"actions": [
{
"agent_id": "a6f14bd2-1a2a-481c-9212-9494d064ffdf",
Expand Down Expand Up @@ -3346,21 +3298,17 @@
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"action": {
"type": "string",
"enum": ["acks"]
}
},
"required": ["success", "action"]
"required": ["action"]
},
"examples": {
"success": {
"value": {
"action": "checkin",
"success": true
"action": "checkin"
}
}
}
Expand Down Expand Up @@ -3417,9 +3365,6 @@
"action": {
"type": "string"
},
"success": {
"type": "boolean"
},
"item": {
"$ref": "#/components/schemas/Agent"
}
Expand All @@ -3429,7 +3374,6 @@
"success": {
"value": {
"action": "created",
"success": true,
"item": {
"id": "8086fb1a-72ca-4a67-8533-09300c1639fa",
"active": true,
Expand Down
20 changes: 6 additions & 14 deletions x-pack/plugins/ingest_manager/common/types/rest_spec/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export interface GetAgentsResponse {
total: number;
page: number;
perPage: number;
success: boolean;
}

export interface GetOneAgentRequest {
Expand All @@ -39,7 +38,6 @@ export interface GetOneAgentRequest {

export interface GetOneAgentResponse {
item: Agent;
success: boolean;
}

export interface PostAgentCheckinRequest {
Expand All @@ -55,7 +53,7 @@ export interface PostAgentCheckinRequest {

export interface PostAgentCheckinResponse {
action: string;
success: boolean;

actions: AgentAction[];
}

Expand All @@ -72,7 +70,7 @@ export interface PostAgentEnrollRequest {

export interface PostAgentEnrollResponse {
action: string;
success: boolean;

item: Agent & { status: AgentStatus };
}

Expand All @@ -87,7 +85,6 @@ export interface PostAgentAcksRequest {

export interface PostAgentAcksResponse {
action: string;
success: boolean;
}

export interface PostNewAgentActionRequest {
Expand All @@ -100,7 +97,6 @@ export interface PostNewAgentActionRequest {
}

export interface PostNewAgentActionResponse {
success: boolean;
item: AgentAction;
}

Expand All @@ -110,9 +106,8 @@ export interface PostAgentUnenrollRequest {
};
}

export interface PostAgentUnenrollResponse {
success: boolean;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PostAgentUnenrollResponse {}

export interface PutAgentReassignRequest {
params: {
Expand All @@ -121,9 +116,8 @@ export interface PutAgentReassignRequest {
body: { policy_id: string };
}

export interface PutAgentReassignResponse {
success: boolean;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PutAgentReassignResponse {}

export interface GetOneAgentEventsRequest {
params: {
Expand All @@ -141,7 +135,6 @@ export interface GetOneAgentEventsResponse {
total: number;
page: number;
perPage: number;
success: boolean;
}

export interface DeleteAgentRequest {
Expand All @@ -166,7 +159,6 @@ export interface GetAgentStatusRequest {
}

export interface GetAgentStatusResponse {
success: boolean;
results: {
events: number;
total: number;
Expand Down
Loading