41 lines
1.0 KiB
Ruby
41 lines
1.0 KiB
Ruby
|
require 'swagger_helper'
|
||
|
|
||
|
RSpec.describe 'passwords', type: :request do
|
||
|
path '/passwords' do
|
||
|
post('send a password (re)set email') do
|
||
|
tags 'Passwords'
|
||
|
consumes 'application/json'
|
||
|
produces 'application/json'
|
||
|
parameter name: :body, in: :body, schema: {
|
||
|
type: :object,
|
||
|
required: [:email_address],
|
||
|
properties: {
|
||
|
email_address: { type: :string, format: :email }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
response_empty_201
|
||
|
end
|
||
|
end
|
||
|
|
||
|
path '/passwords/{token}' do
|
||
|
parameter name: 'token', in: :path, type: :string, description: 'token'
|
||
|
put('update password') do
|
||
|
tags 'Passwords'
|
||
|
consumes 'application/json'
|
||
|
produces 'application/json'
|
||
|
parameter name: :body, in: :body, schema: {
|
||
|
type: :object,
|
||
|
required: %i[password password_confirmation],
|
||
|
properties: {
|
||
|
password: { type: :string },
|
||
|
password_confirmation: { type: :string }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
response_empty_200
|
||
|
response_422
|
||
|
end
|
||
|
end
|
||
|
end
|