-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
139 lines (138 loc) · 3.93 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
swagger: "2.0"
info:
description: "Palmu is a requirements detection service build for the OpenReq project"
version: "1.0.0"
title: "Palmu"
termsOfService: "http://swagger.io/terms/"
contact:
email: "[email protected]"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "api.openreq.eu"
basePath: "/palmu"
tags:
- name: "Palmu"
description: "Requirement detection"
externalDocs:
description: "Find out more"
url: "http://swagger.io"
schemes:
- "https"
- "http"
paths:
/getRelated:
get:
tags:
- "Palmu"
summary: "Get related issues for a given query."
description: ""
operationId: "getRelated"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "query"
name: "id"
type: "string"
description: "The id of the requirement to be queried"
- in : "query"
name: "k"
type: "integer"
description: "Number of similar requirements to be retrieved"
default: 10
- in: "query"
name: "m"
type: "integer"
description: "A multiplier used to enhance the importance of orphan requirements over other. Is 1 by default"
default: 1
responses:
200:
description: "OpenReq dependencies object"
405:
description: "Invalid input"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
/postProject:
post:
tags:
- "Palmu"
summary: "Post new projects to the Palmu database"
description: "This endpoint recieves as a parameter a valid OpenReq Json with new requeriments to be added to the database. Must be used with care since it will update the entire database of word embeddings and as a result the service will be restarted, and will take around 40 minutes to be available again."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "The request must contain a valid list of OpenReqJson projects. Only one project is per call"
schema:
$ref: "#/definitions/openReqJson"
responses:
200:
description: "successfull operation. Restating server"
/updateRequirements:
post:
tags:
- "Palmu"
summary: "Update or add new requirements to the service"
description: "This endpoint can be used to add new or modify requirements ( and their word embeddings) in the service. This endpoint doesn't work in an asynchronus fashion and it may keep other services hanging while it finishes the updates."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "The request must contain a valid list of OpenReqJson projects. Only one project is per call"
schema:
$ref: "#/definitions/openReqJson"
responses:
200:
description: "successfull operation, requirements updated"
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
queryIssueObject:
type: "object"
properties:
id:
type: "string"
k:
type: "integer"
format: "int64"
default: 10
m:
type: "integer"
format: "int64"
default: 1
newIssueObject:
type: "object"
properties:
issue:
type: "object"
k:
type: "integer"
format: "int64"
openReqJson:
type: object
properties:
projects:
type: "object"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"