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,
|
type: :object,
|
||||||
properties: %{
|
properties: %{
|
||||||
template_id: %Schema{type: :string, format: :uuid},
|
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"]},
|
client_type: %Schema{type: :string, enum: ["natural", "juridico"]},
|
||||||
document_url: %Schema{type: :string},
|
document_url: %Schema{type: :string},
|
||||||
active: %Schema{type: :boolean}
|
active: %Schema{type: :boolean}
|
||||||
@@ -88,7 +88,6 @@ defmodule ProviderServiceWeb.Schemas.Provider do
|
|||||||
},
|
},
|
||||||
policy_type: %Schema{
|
policy_type: %Schema{
|
||||||
type: :string,
|
type: :string,
|
||||||
enum: ["car", "life", "fire"],
|
|
||||||
description: "Policy type this template applies to"
|
description: "Policy type this template applies to"
|
||||||
},
|
},
|
||||||
client_type: %Schema{
|
client_type: %Schema{
|
||||||
@@ -161,21 +160,13 @@ defmodule ProviderServiceWeb.Schemas.Provider do
|
|||||||
active: %Schema{type: :boolean},
|
active: %Schema{type: :boolean},
|
||||||
templates: %Schema{
|
templates: %Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
description: "Map of policy_type (car | life | fire) to client_type map of templates",
|
description: "Map of policy_type to client_type map of templates",
|
||||||
properties: %{
|
additionalProperties: ClientTypeTemplates
|
||||||
car: ClientTypeTemplates,
|
|
||||||
life: ClientTypeTemplates,
|
|
||||||
fire: ClientTypeTemplates
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
default_templates: %Schema{
|
default_templates: %Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
description: "Map of policy_type to client_type to default template_id",
|
description: "Map of policy_type to client_type to default template_id",
|
||||||
properties: %{
|
additionalProperties: ClientTypeDefaults
|
||||||
car: ClientTypeDefaults,
|
|
||||||
life: ClientTypeDefaults,
|
|
||||||
fire: ClientTypeDefaults
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user