Skip to content

Commit 6de98af

Browse files
authored
API spec fixes (#159)
* Don't start the app when generating API spec * lint * Fix api spec not being versioned * fix
1 parent d4a0f77 commit 6de98af

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

lib/jellyfish_web/api_spec.ex

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ defmodule JellyfishWeb.ApiSpec do
44

55
alias OpenApiSpex.{Components, Info, License, Paths, Schema, SecurityScheme}
66

7+
@version Mix.Project.config()[:version]
8+
79
# OpenAPISpex master specification
810

911
@impl OpenApiSpex.OpenApi
1012
def spec() do
1113
%OpenApiSpex.OpenApi{
1214
info: %Info{
1315
title: "Jellyfish Media Server",
14-
version: "0.2.0",
16+
version: @version,
1517
license: %License{
1618
name: "Apache 2.0",
1719
url: "https://www.apache.org/licenses/LICENSE-2.0"

mix.exs

+7-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,13 @@ defmodule Jellyfish.MixProject do
150150
{_io_stream, exit_status} =
151151
System.cmd(
152152
"mix",
153-
["openapi.spec.yaml", "--spec", "JellyfishWeb.ApiSpec", generated_filename],
153+
[
154+
"openapi.spec.yaml",
155+
"--start-app=false",
156+
"--spec",
157+
"JellyfishWeb.ApiSpec",
158+
generated_filename
159+
],
154160
into: IO.stream()
155161
)
156162

openapi.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ info:
747747
name: Apache 2.0
748748
url: https://www.apache.org/licenses/LICENSE-2.0
749749
title: Jellyfish Media Server
750-
version: 0.2.0
750+
version: 0.4.0
751751
openapi: 3.0.0
752752
paths:
753753
/health:

0 commit comments

Comments
 (0)