2024-11-30 13:27:21 +00:00
|
|
|
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
|
2024-11-30 14:24:02 +01:00
|
|
|
module Swagger
|
|
|
|
module Schema
|
|
|
|
USER = {
|
|
|
|
id: { type: :string, format: :uuid },
|
2024-12-08 11:30:38 +01:00
|
|
|
email: { type: :string, format: :email },
|
|
|
|
created_at: SwaggerResponseHelper::TIMESTAMP,
|
|
|
|
updated_at: SwaggerResponseHelper::TIMESTAMP
|
|
|
|
}
|
|
|
|
|
2024-12-08 14:00:53 +01:00
|
|
|
ID = {
|
|
|
|
name: 'id',
|
|
|
|
in: :path,
|
|
|
|
type: :string,
|
|
|
|
format: :uuid,
|
|
|
|
}
|
|
|
|
|
2024-12-08 11:30:38 +01:00
|
|
|
GROUP = {
|
|
|
|
name: { type: :string },
|
|
|
|
icon: { type: :string, example: 'pi pi-crown', description: 'The CSS classes used by the icon' },
|
|
|
|
parent_id: { type: :string, format: :uuid },
|
|
|
|
color: { type: :string, pattern: '^#(?:[0-9a-fA-F]{3}){1,2}$' }
|
2024-11-30 14:24:02 +01:00
|
|
|
}
|
2024-11-30 19:57:08 +01:00
|
|
|
|
|
|
|
SLUG = {
|
|
|
|
name: 'slug',
|
|
|
|
in: :path,
|
|
|
|
type: :string,
|
2024-12-01 18:17:07 +01:00
|
|
|
pattern: Wedding::SLUG_REGEX,
|
2024-11-30 19:57:08 +01:00
|
|
|
example: :default,
|
|
|
|
description: 'Wedding slug'
|
|
|
|
}
|
2024-12-01 19:56:49 +01:00
|
|
|
|
|
|
|
CAPTCHA = {
|
|
|
|
captcha: {
|
|
|
|
type: :object,
|
|
|
|
required: %i[id answer],
|
|
|
|
properties: {
|
|
|
|
id: { type: :string, format: :uuid },
|
|
|
|
answer: { type: :string }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-11-30 14:24:02 +01:00
|
|
|
end
|
|
|
|
end
|