forked from elixir-oasis/oasis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
106 lines (95 loc) · 2.43 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
defmodule Oasis.MixProject do
use Mix.Project
@source_url "https://github.com/elixir-oasis/oasis"
def project do
[
app: :oasis,
version: "0.4.3",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
description: description(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp description do
"An Elixir server implementation of OpenAPI Specification v3 within Plug"
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:yaml_elixir, "~> 2.5"},
{:plug, "~> 1.11"},
{:plug_crypto, "~> 1.2"},
{:jason, "~> 1.2"},
{:ex_json_schema, "~> 0.7"},
{:recase, "~> 0.7", runtime: false},
{:plug_cowboy, "~> 2.0", only: [:dev, :test]},
{:finch, "~> 0.6", only: [:dev, :test]},
{:excoveralls, "~> 0.10", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end
defp package do
[
files: ["lib", "mix.exs", "README.md", "LICENSE.md", "priv/templates"],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url
}
]
end
defp docs() do
[
main: "readme",
source_url: @source_url,
formatter_opts: [gfm: true],
extras: [
"README.md",
"CHANGELOG.md",
"guides/handle_errors.md",
"guides/specification_ext.md",
"guides/hmac_based_authentication.md",
],
groups_for_modules: groups_for_modules(),
groups_for_extras: groups_for_extras()
]
end
defp groups_for_modules() do
[
Plugs: [
Oasis.Plug.BearerAuth,
Oasis.Plug.HMACAuth,
Oasis.Plug.RequestValidator
],
Errors: [
Oasis.BadRequestError.Invalid,
Oasis.BadRequestError.Required,
Oasis.BadRequestError.JsonSchemaValidationFailed,
Oasis.BadRequestError.InvalidToken
]
]
end
defp groups_for_extras() do
[
Guides: ~r/guides\/[^\/]+\.md/
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end