forked from open-api-spex/open_api_spex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
106 lines (98 loc) · 2.53 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 OpenApiSpex.Mixfile do
use Mix.Project
@source_url "https://github.com/open-api-spex/open_api_spex"
@version "3.18.1"
def project do
[
app: :open_api_spex,
version: @version,
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
package: package(),
deps: deps(),
docs: docs(),
dialyzer: dialyzer(),
test_coverage: [
ignore_modules: [
~r/OpenApiSpexTest\./,
~r/OpenApiSpex.Extendable\./,
~r/Poison.Encoder\./
]
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application, do: [extra_applications: []]
defp package() do
[
name: "open_api_spex",
description:
"Leverage Open Api Specification 3 (swagger) to document, " <>
"test, validate and explore your Plug and Phoenix APIs.",
files: [
"lib",
"mix.exs",
"README.md",
"LICENSE",
"CHANGELOG.md",
"CONTRIBUTING.md",
"ROADMAP.md",
".formatter.exs"
],
maintainers: [
"Mike Buhot ([email protected])",
"Moxley Stratton ([email protected])",
"Pierre Fenoll ([email protected])",
"Dimitris Zorbas ([email protected])"
],
licenses: ["MPL-2.0"],
links: %{
"Changelog" => "https://hexdocs.pm/open_api_spex/changelog.html",
"GitHub" => @source_url
}
]
end
defp deps do
[
{:credo, "~> 1.0", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:jason, "~> 1.0", optional: true},
{:phoenix, "~> 1.3", only: [:dev, :test]},
{:plug, "~> 1.7"},
{:poison, "~> 3.0 or ~> 4.0 or ~> 5.0", optional: true},
{:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0", optional: true}
]
end
defp docs do
[
extras: [
"CHANGELOG.md",
"CONTRIBUTING.md",
"ROADMAP.md",
{:LICENSE, [title: "License"]},
"README.md"
],
main: "readme",
homepage_url: @source_url,
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"]
]
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: ~w(
ex_unit
jason
mix
poison
ymlr
)a
]
end
end