-
Notifications
You must be signed in to change notification settings - Fork 19
/
swagger.yaml
101 lines (101 loc) · 2.77 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
swagger: '2.0'
info:
title: API for NPM companion recommendations
description: Spec for the RESTful interface to the NPM insights model.
version: '0.1'
basePath: /api/v1/
consumes:
- application/json
produces:
- application/json
paths:
/liveness:
get:
tags:
- Service settings
operationId: f8a_admin.api_v1.liveness
summary: Get service liveness
responses:
'200':
description: Service is alive
/readiness:
get:
tags:
- Service settings
operationId: f8a_admin.api_v1.readiness
summary: Get service readiness
responses:
'200':
description: Service is ready
/companion_recommendation:
post:
tags:
- Recommendation API
operationId: f8a_recommender.api_v1.companion_recommendation
summary: >-
Return companion package recommendations for a stack of the NPM
ecosystem
parameters:
- in: body
name: body
description: >-
Request body expects the one parameter \"package_list\", which is a
list containing the user's packages (with version information
stripped). Also as an optional parameter takes in the companion package threshold
which is the number of companions to be returned.
required: true
schema:
$ref: '#/definitions/UserStack'
responses:
'200':
schema:
$ref: '#/definitions/Response'
description: Companion recommendations along with their associated probabilities
'500':
description: Internal Server Error
definitions:
UserStack:
title: Request format for companion_recommendation endpoint
description: Request format for companion_recommendation endpoint
type: array
items:
type: object
properties:
package_list:
type: array
items:
type: string
comp_package_count_threshold:
type: number
Response:
title: Response containing the recommendations
description: Response containing the recommendations
properties:
ecosystem:
type: string
missing_packages:
type: array
items:
type: string
companion_packages:
$ref: '#/definitions/recommendation'
package_to_topic_dict:
type: object
properties:
package_name:
type: array
items:
type: string
recommendation:
type: array
items:
type: object
properties:
package_name:
type: string
cooccurrence_probability:
type: number
topic_list:
type: array
items:
type: string