rename policy_details to insured_object
All checks were successful
Build and Publish / build-release (push) Successful in 1m36s
All checks were successful
Build and Publish / build-release (push) Successful in 1m36s
This commit is contained in:
@@ -282,11 +282,11 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
})
|
||||
end
|
||||
|
||||
defmodule PolicyDetails do
|
||||
defmodule InsuredObject do
|
||||
require OpenApiSpex
|
||||
|
||||
OpenApiSpex.schema(%{
|
||||
title: "PolicyDetails",
|
||||
title: "InsuredObject",
|
||||
oneOf: [
|
||||
CarPolicyDetails,
|
||||
LifePolicyDetails,
|
||||
@@ -356,16 +356,16 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
OpenApiSpex.schema(%{
|
||||
title: "CreatePolicyRequest",
|
||||
type: :object,
|
||||
required: [:policy_type, :insured, :buyer, :policy_details, :selected_providers],
|
||||
required: [:policy_type, :insured, :buyer, :insured_object, :selected_providers],
|
||||
properties: %{
|
||||
policy_type: %Schema{
|
||||
type: :string,
|
||||
enum: ["car", "life", "fire_structure", "fire_contents"],
|
||||
description: "Determines the shape of policy_details"
|
||||
description: "Determines the shape of insured_object"
|
||||
},
|
||||
insured: Insured,
|
||||
buyer: Buyer,
|
||||
policy_details: PolicyDetails,
|
||||
insured_object: InsuredObject,
|
||||
selected_providers: %Schema{type: :array, items: SelectedProvider, minItems: 1}
|
||||
}
|
||||
})
|
||||
@@ -422,7 +422,7 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
},
|
||||
insured: Insured,
|
||||
buyer: Buyer,
|
||||
policy_details: PolicyDetails,
|
||||
insured_object: InsuredObject,
|
||||
provider_policy_number: %Schema{type: :string, nullable: true},
|
||||
submitted_at: %Schema{type: :string, format: :"date-time"}
|
||||
}
|
||||
@@ -449,7 +449,7 @@ defmodule PolicyServiceWeb.Schemas.Policy do
|
||||
},
|
||||
insured: Insured,
|
||||
buyer: Buyer,
|
||||
policy_details: PolicyDetails,
|
||||
insured_object: InsuredObject,
|
||||
selected_providers: %Schema{type: :array, items: %Schema{type: :string}},
|
||||
quotes: %Schema{type: :object, additionalProperties: QuoteData},
|
||||
accepted_plan_id: %Schema{type: :string, nullable: true},
|
||||
|
||||
Reference in New Issue
Block a user