Following the documentation of Swagger I’ve been able to document most of my API. The one I’m stuck on seems to be an array in the GET url.
What this generates is:
http://localhost/[some_url]/?users=10&users=20&page=1
instead of what I (Laravel) need(s):
http://localhost/[some_url]/?users[]=10&users[]=20&page=1
My configuration is:
<code>@OAGet(
path="/api/[some_url]",
tags={"Description goes here"},
summary="Summary goes here",
@OAParameter(
description="Users",
in="query",
name="users",
required=false,
example="[10, 20]",
@OASchema(type="array", @OAItems(type="integer"))
),
@OAParameter(
description="Page",
in="query",
name="page",
required=false,
example="1",
@OASchema(type="integer")
),
@OAResponse(
response="200",
description="OK (successfully authenticated)",
@OAJsonContent()
)
)
</code>
<code>@OAGet(
path="/api/[some_url]",
tags={"Description goes here"},
summary="Summary goes here",
@OAParameter(
description="Users",
in="query",
name="users",
required=false,
example="[10, 20]",
@OASchema(type="array", @OAItems(type="integer"))
),
@OAParameter(
description="Page",
in="query",
name="page",
required=false,
example="1",
@OASchema(type="integer")
),
@OAResponse(
response="200",
description="OK (successfully authenticated)",
@OAJsonContent()
)
)
</code>
@OAGet(
path="/api/[some_url]",
tags={"Description goes here"},
summary="Summary goes here",
@OAParameter(
description="Users",
in="query",
name="users",
required=false,
example="[10, 20]",
@OASchema(type="array", @OAItems(type="integer"))
),
@OAParameter(
description="Page",
in="query",
name="page",
required=false,
example="1",
@OASchema(type="integer")
),
@OAResponse(
response="200",
description="OK (successfully authenticated)",
@OAJsonContent()
)
)
2