-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
Using https://editor.swagger.io/ I just caught a few errors that so far had gone unnoticed. I had a few routes with path parameters (e.g. get("/dota2/abilities/:dota2_ability_id", Dota2.AbilityController, :show)
) but I forgot to declare :dota2_ability_id
in the parameters list. Here it is, commented out:
@spec open_api_operation(atom()) :: Op.t()
# /dota2/abilities/:dota2_ability_id
def open_api_operation(:show),
do: %Op{
# parameters: [OpenAPI.param(:dota2_ability_id)],
responses: OpenAPI.resp_Dota2Ability()
}
Could we add some check that makes the ....OpenAPI.spec()
call fail if path parameters are missing?
I'm not sure what could be done for missing parameters of other kinds.