Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 4e49625

Browse files
authored
feat(auth): basic auth for /v3/doctor/{id} API endpoint (#88)
new swagger spec, and generated client, to introduce basic auth for /v3/doctor/{id} endpoint
1 parent 84206b2 commit 4e49625

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

api/swagger-spec/swagger.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ paths:
5858
get:
5959
operationId: getDoctorInfo
6060
summary: "get the specified doctor report as per UUID"
61+
security:
62+
- basic: []
6163
responses:
6264
200:
6365
description: doctor get response
@@ -291,6 +293,9 @@ parameters:
291293
in: path
292294
description: A universal Id to represent a sepcific request or report
293295
required: true
296+
securityDefinitions:
297+
basic:
298+
type: basic
294299
definitions:
295300
cluster:
296301
type: object

pkg/swagger/client/operations/operations_client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (a *Client) GetComponentsByLatestReleaseForV2(params *GetComponentsByLatest
250250
/*
251251
GetDoctorInfo gets the specified doctor report as per UUID
252252
*/
253-
func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams) (*GetDoctorInfoOK, error) {
253+
func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams, authInfo client.AuthInfoWriter) (*GetDoctorInfoOK, error) {
254254
// TODO: Validate the params before sending
255255
if params == nil {
256256
params = NewGetDoctorInfoParams()
@@ -265,6 +265,7 @@ func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams) (*GetDoctorInfoOK, e
265265
Schemes: []string{"http"},
266266
Params: params,
267267
Reader: &GetDoctorInfoReader{formats: a.formats},
268+
AuthInfo: authInfo,
268269
})
269270
if err != nil {
270271
return nil, err

0 commit comments

Comments
 (0)