use generic policy type
All checks were successful
Build and Publish / build-release (push) Successful in 1m27s
All checks were successful
Build and Publish / build-release (push) Successful in 1m27s
This commit is contained in:
@@ -26,7 +26,7 @@ defmodule ProviderServiceWeb.Schemas.Provider do
|
||||
type: :object,
|
||||
properties: %{
|
||||
template_id: %Schema{type: :string, format: :uuid},
|
||||
policy_type: %Schema{type: :string, enum: ["car", "life", "fire"]},
|
||||
policy_type: %Schema{type: :string},
|
||||
client_type: %Schema{type: :string, enum: ["natural", "juridico"]},
|
||||
document_url: %Schema{type: :string},
|
||||
active: %Schema{type: :boolean}
|
||||
@@ -88,7 +88,6 @@ defmodule ProviderServiceWeb.Schemas.Provider do
|
||||
},
|
||||
policy_type: %Schema{
|
||||
type: :string,
|
||||
enum: ["car", "life", "fire"],
|
||||
description: "Policy type this template applies to"
|
||||
},
|
||||
client_type: %Schema{
|
||||
@@ -161,21 +160,13 @@ defmodule ProviderServiceWeb.Schemas.Provider do
|
||||
active: %Schema{type: :boolean},
|
||||
templates: %Schema{
|
||||
type: :object,
|
||||
description: "Map of policy_type (car | life | fire) to client_type map of templates",
|
||||
properties: %{
|
||||
car: ClientTypeTemplates,
|
||||
life: ClientTypeTemplates,
|
||||
fire: ClientTypeTemplates
|
||||
}
|
||||
description: "Map of policy_type to client_type map of templates",
|
||||
additionalProperties: ClientTypeTemplates
|
||||
},
|
||||
default_templates: %Schema{
|
||||
type: :object,
|
||||
description: "Map of policy_type to client_type to default template_id",
|
||||
properties: %{
|
||||
car: ClientTypeDefaults,
|
||||
life: ClientTypeDefaults,
|
||||
fire: ClientTypeDefaults
|
||||
}
|
||||
additionalProperties: ClientTypeDefaults
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user