at https://hexdocs.pm/open_api_spex/3.2.0/readme.html there's a definition of a module User

defmodule MyApp.Schemas do
  alias OpenApiSpex.Schema

  defmodule User do
    @behaviour OpenApiSpex.Schema
    @derive [Jason.Encoder]
    @schema %Schema{
      title: "User",
      description: "A user of the app",
      type: :object,
      properties: %{
        id: %Schema{type: :integer, description: "User ID"},
        name:  %Schema{type: :string, description: "User name"},
        email: %Schema{type: :string, description: "Email address", format: :email},
        inserted_at: %Schema{type: :string, description: "Creation timestamp", format: :datetime},
        updated_at: %Schema{type: :string, description: "Update timestamp", format: :datetime}
      },
      required: [:name, :email],
      example: %{
        "id" => 123,
        "name" => "Joe",
        "email" => "joe@gmail.com"
      }
      "x-struct": __MODULE__
    }
    def schema, do: @schema
    defstruct Map.keys(@schema.properties)
  end

In order to avoid re-describing it like that for Open API Specs whilst having already done so for Ecto, is it possible to combine the two definitions in a single module somehow? That is, my Ecto schema User would serve its purpose for Open API Specs too. With some required tweaks.

And if I do combine them, won't this mess up with the methods of the 2 modules and other things?

 

Whenever I encounter the label "made in EU", "Germany", "Estonia", "France" ...... in the footer of a web project, which implies enhanced data-protection, apparently, I wonder:

How can it be so? There're some data-protection laws, yes. But one can't control a hosting provider 24h/day. One can't know whether an employer there copies all data on his memory-drivers.

Can't the police, if need be, seize a server as easily as it would in any other country on Earth?

Don't the majority of all of countries in Europe share information with the intelligence of US by the agreements of the 5 eyes, 9 eyes, 14 eyes? Whereas the 2nd and 3rd world countries don't.

How is it better than a label "made in South Africa", "Thailand", "Costa Rica", "Egypt", "Kuwait"?

I can see how "made in Germany" or EU makes a project worse in terms of privacy and data-protection. How could it make it better, though?