-
Notifications
You must be signed in to change notification settings - Fork 54
Show the correct warning when user creates an action with a relative URI #350
Comments
Designer's note: This was never intended in the API Blueprint. The URL (template) of an action should be relative to the API's root not to the parent resource. |
That's right, the paths for actions are not relative to the resource. I'm saying the validation warning being emitted is a bug. The following two warnings are emitted when reproducing this problem. The warning is implying the API Blueprint parser is trying to apply the actions parameters to the resource URI and they are not there. This should not be the case.
Example blueprint: ## Users [/users]
### View a User [GET {username}]
+ Parameters
+ username: kyle (string)
+ Response 204 I guess, the correct warning should read that the path should include a forward slash at the start of the URI. @JefStat You can take the above into account and change your URI for your action to be absolute and become |
Thanks @kylef I have done that. |
This has now been done. The parser will show the following warning:
|
Follow error is returned for this snippet
parameter 'id' not specified in 'Reports' its '/reports' URI template
The text was updated successfully, but these errors were encountered: