Skip to content

Commit 4ab63c2

Browse files
authored
Fix/doc mistake on endpoint filtering parameter (Azure#293)
1 parent 62f9cf4 commit 4ab63c2

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

docs/openapi.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,30 @@ public static async Task<IActionResult> MyFunction2(...)
141141
{
142142
...
143143
}
144+
145+
[FunctionName("MyOptionFunction1")]
146+
[OpenApiOperation(operationId: ..., tags: new[] { "option" })]
147+
...
148+
public static async Task<IActionResult> MyOptionFunction1(...)
149+
{
150+
...
151+
}
152+
144153
```
145154

146-
If you only want to only show the admin API endpoints, add `filter=admin` to the querystring:
155+
If you only want to only show the admin API endpoints, add `tag=admin` to the querystring:
147156

148157
```
149-
http://localhost:7071/api/swagger/ui?filter=admin
150-
http://localhost:7071/api/swagger.json?filter=admin
158+
http://localhost:7071/api/swagger/ui?tag=admin
159+
http://localhost:7071/api/swagger.json?tag=admin
151160
```
152161

153-
If you want to only show the product related API endpoints, add `filter=product` to the querystring:
162+
The `tag` parameter accepts a commma separated list of tags. Any function with any tag passed on the `tag` parameter will be selected.
163+
If you only want to show the API endpoints related to `product` or `option` tag, add `tag=product,option` to the querystring:
154164

155165
```
156-
http://localhost:7071/api/swagger/ui?filter=product
157-
http://localhost:7071/api/swagger.json?filter=product
166+
http://localhost:7071/api/swagger/ui?tag=product,option
167+
http://localhost:7071/api/swagger.json?tag=product,option
158168
```
159169

160170

0 commit comments

Comments
 (0)