add life policy aggregate
Some checks failed
Build and Publish / build-release (push) Failing after 38s
Some checks failed
Build and Publish / build-release (push) Failing after 38s
This commit is contained in:
@@ -24,12 +24,13 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
OpenApiSpex.schema(%{
|
||||
title: "InsuredIndividual",
|
||||
type: :object,
|
||||
required: [:type, :name, :date_of_birth, :document_id],
|
||||
required: [:type, :name, :date_of_birth, :document_id, :gender],
|
||||
properties: %{
|
||||
type: %Schema{type: :string, enum: ["individual"]},
|
||||
name: %Schema{type: :string, example: "Juan Pérez"},
|
||||
date_of_birth: %Schema{type: :string, format: :date, example: "1985-06-15"},
|
||||
document_id: %Schema{type: :string, example: "8-123-456"},
|
||||
gender: %Schema{type: :string, enum: ["male", "female"], example: "male"},
|
||||
email: %Schema{type: :string, format: :email, example: "juan@example.com"},
|
||||
phone: %Schema{type: :string, example: "+507-1234-5678"},
|
||||
address: %Schema{type: :string, example: "Calle 50, Panama City"}
|
||||
@@ -220,7 +221,7 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
OpenApiSpex.schema(%{
|
||||
title: "LifePolicyDetails",
|
||||
type: :object,
|
||||
required: [:coverage_type, :coverage_amount, :coverage_years, :smoker, :weight, :height],
|
||||
required: [:coverage_type, :coverage_amount, :coverage_years, :smoker],
|
||||
properties: %{
|
||||
coverage_type: %Schema{
|
||||
type: :string,
|
||||
@@ -229,8 +230,8 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
coverage_amount: %Schema{type: :number, example: 100_000},
|
||||
coverage_years: %Schema{type: :integer, example: 10},
|
||||
smoker: %Schema{type: :boolean, example: false},
|
||||
medications: %Schema{type: :array, items: %Schema{type: :string}},
|
||||
surgeries: %Schema{type: :array, items: %Schema{type: :string}},
|
||||
medications: %Schema{type: :array, items: %Schema{type: :string}, example: ["Aspirin", "Lisinopril"]},
|
||||
surgeries: %Schema{type: :array, items: %Schema{type: :string}, example: ["Appendectomy, 2015"]},
|
||||
weight: %Schema{type: :number, example: 70},
|
||||
height: %Schema{type: :number, example: 175}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user