0
假设有一个具有可选参数的URL路径的API:如何在API蓝图中记录路径中的可选参数?
## Get FooBar [/foo/bar/{type}]
+ Parameters
+ type (optional, string, `widget`) ... Filter for a specific bar type
当然的type
参数确实应该查询参数,但API实现,因为它是和不能优化。
type
可以在URI模板中表示这种可选性吗?