Skip to content

Commit

Permalink
Merge pull request #224 from omisego/feat/OMG-289_Fix_swagger_definit…
Browse files Browse the repository at this point in the history
…ions

OMG-289 - Fix swagger definitions (lacks in documentation)
  • Loading branch information
purbanow committed Oct 19, 2018
2 parents 5f832fc + 9b88b5e commit 906e8d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/omg_watcher/lib/web/controllers/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule OMG.Watcher.Web.Controller.Account do

def swagger_definitions do
%{
Currency_balance:
CurrencyBalance:
swagger_schema do
title("Balance of the currency")

Expand All @@ -54,7 +54,7 @@ defmodule OMG.Watcher.Web.Controller.Account do
swagger_schema do
title("Array of currency balances")
type(:array)
items(Schema.ref(:Currency_balance))
items(Schema.ref(:CurrencyBalance))
end
}
end
Expand Down
2 changes: 1 addition & 1 deletion apps/omg_watcher/lib/web/controllers/challenge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ defmodule OMG.Watcher.Web.Controller.Challenge do
}
end

swagger_path :get_challenge_data do
swagger_path :get_utxo_challenge do
get("/utxo/{utxo_pos}/challenge_data")
summary("Gets challenge for a given exit")

Expand Down
4 changes: 2 additions & 2 deletions apps/omg_watcher/lib/web/controllers/transaction.ex
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ defmodule OMG.Watcher.Web.Controller.Transaction do
type(:array)
items(Schema.ref(:Output))
end,
Post_Transaction_Body:
PostTransaction:
swagger_schema do
title("Inputs and outputs to transaction")

Expand Down Expand Up @@ -177,7 +177,7 @@ defmodule OMG.Watcher.Web.Controller.Transaction do
summary("Produces hex-encoded transaction bytes for provided inputs and outputs.")

parameters do
body(:body, Schema.ref(:Post_Transaction_Body), "The request body", required: true)
body(:body, Schema.ref(:PostTransaction), "The request body", required: true)
end

response(200, "OK")
Expand Down
2 changes: 1 addition & 1 deletion apps/omg_watcher/lib/web/controllers/utxo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ defmodule OMG.Watcher.Web.Controller.Utxo do
response(200, "OK", Schema.ref(:Utxos))
end

swagger_path :get_exit_data do
swagger_path :get_utxo_exit do
get("/utxo/{utxo_pos}/exit_data")
summary("Responds with exit for a given utxo")

Expand Down

0 comments on commit 906e8d1

Please sign in to comment.