Skip to content

Commit

Permalink
minor #397 Minor fixes to swagger definition. (dlobato)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.0-dev branch.

Discussion
----------

Add password-reset endpoint.
Fixes security property on order endpoints.

Commits
-------

5afc8aa Add password-reset endpoint.
  • Loading branch information
lchrusciel authored Feb 15, 2019
2 parents dd8afd8 + 5afc8aa commit 424c86d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions doc/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,31 @@ paths:
description: "Reset password request has been sent."
500:
description: "User with provided email has not been found."
/{channelCode}/password-reset/{token}:
parameters:
- $ref: "#/parameters/ChannelCode"
- in: "path"
name: "token"
description: "Password reset token."
required: true
type: "string"
put:
tags:
- "users"
summary: "Password reset."
description: "This endpoint resets the user password."
operationId: "passwordReset"
parameters:
- name: "content"
in: "body"
required: true
schema:
$ref: "#/definitions/PasswordResetRequest"
responses:
204:
description: "Update password request success."
400:
description: "Token not found."
/{channelCode}/register:
parameters:
- $ref: "#/parameters/ChannelCode"
Expand Down Expand Up @@ -752,6 +777,8 @@ paths:
$ref: "#/definitions/PlacedOrder"
401:
description: "User token invalid"
security:
- bearerAuth: []
/{channelCode}/orders/{tokenValue}:
parameters:
- $ref: "#/parameters/ChannelCode"
Expand All @@ -774,6 +801,8 @@ paths:
description: "User token invalid"
404:
description: "Order with given tokenValue not found"
security:
- bearerAuth: []
/{channelCode}/me:
parameters:
- $ref: "#/parameters/ChannelCode"
Expand Down Expand Up @@ -1495,6 +1524,20 @@ definitions:
email:
type: "string"
example: "test@example.com"
PasswordResetRequest:
type: "object"
properties:
password:
$ref: "#/definitions/PasswordReset"
PasswordReset:
type: object
properties:
first:
type: "string"
example: "a-new-password"
second:
type: "string"
example: "a-new-password"
RegisterRequest:
type: "object"
properties:
Expand Down

0 comments on commit 424c86d

Please sign in to comment.