Skip to content

Commit

Permalink
feat(auth): basic auth for /v3/doctor/{id} API endpoint (#88)
Browse files Browse the repository at this point in the history
new swagger spec, and generated client, to introduce basic auth for /v3/doctor/{id} endpoint
  • Loading branch information
jackfrancis committed Aug 2, 2016
1 parent 84206b2 commit 4e49625
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/swagger-spec/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ paths:
get:
operationId: getDoctorInfo
summary: "get the specified doctor report as per UUID"
security:
- basic: []
responses:
200:
description: doctor get response
Expand Down Expand Up @@ -291,6 +293,9 @@ parameters:
in: path
description: A universal Id to represent a sepcific request or report
required: true
securityDefinitions:
basic:
type: basic
definitions:
cluster:
type: object
Expand Down
3 changes: 2 additions & 1 deletion pkg/swagger/client/operations/operations_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (a *Client) GetComponentsByLatestReleaseForV2(params *GetComponentsByLatest
/*
GetDoctorInfo gets the specified doctor report as per UUID
*/
func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams) (*GetDoctorInfoOK, error) {
func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams, authInfo client.AuthInfoWriter) (*GetDoctorInfoOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetDoctorInfoParams()
Expand All @@ -265,6 +265,7 @@ func (a *Client) GetDoctorInfo(params *GetDoctorInfoParams) (*GetDoctorInfoOK, e
Schemes: []string{"http"},
Params: params,
Reader: &GetDoctorInfoReader{formats: a.formats},
AuthInfo: authInfo,
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 4e49625

Please sign in to comment.