2024-11-30 13:27:21 +00:00
|
|
|
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
|
2024-11-30 14:24:02 +01:00
|
|
|
require 'swagger_helper'
|
|
|
|
|
|
|
|
RSpec.describe 'users/registrations', type: :request do
|
|
|
|
|
2024-11-30 19:57:08 +01:00
|
|
|
path '/{slug}/users' do
|
2024-11-30 14:24:02 +01:00
|
|
|
post('create registration') do
|
|
|
|
tags 'Users Registrations'
|
|
|
|
consumes 'application/json'
|
|
|
|
produces 'application/json'
|
2024-11-30 19:57:08 +01:00
|
|
|
|
|
|
|
parameter Swagger::Schema::SLUG
|
2024-11-30 14:24:02 +01:00
|
|
|
parameter name: :body, in: :body, schema: {
|
|
|
|
type: :object,
|
2024-12-01 14:04:03 +01:00
|
|
|
required: [:user, :wedding],
|
2024-11-30 14:24:02 +01:00
|
|
|
properties: {
|
|
|
|
user: {
|
|
|
|
type: :object,
|
|
|
|
required: %i[email password password_confirmation],
|
|
|
|
properties: {
|
|
|
|
email: { type: :string, format: :email},
|
|
|
|
password: SwaggerResponseHelper::PASSWORD,
|
|
|
|
password_confirmation: SwaggerResponseHelper::PASSWORD
|
|
|
|
}
|
2024-12-01 14:03:06 +01:00
|
|
|
},
|
2024-12-01 19:56:49 +01:00
|
|
|
**Swagger::Schema::CAPTCHA
|
2024-11-30 14:24:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
response(201, 'created') do
|
|
|
|
schema type: :object, properties: Swagger::Schema::USER
|
|
|
|
xit
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|