-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path segment variable with visible name? #377
Comments
Hi @sniff
is exactly what you ask for if I am reading correctly. Another example with parameters https://apiblueprint.org/documentation/examples/07-parameters.html |
@w-vi No, it does not. This will add only parameter value to URL ( Your example will be rendered as I don't want to describe two methods for with 100% same parameters (
|
How about shared parameter section: FORMAT: 1A
# Sample API
## Commit collection [/commits{?page,size}]
+ Parameters
+ page: 1 (number)
+ size: 1 (optional, number)
### Read commits [GET /commits{?page,size}]
+ Response 200 (application/json)
### Read commits for project [GET /project/{projectName}/commits{?page,size}]
+ Parameters
+ projectName: `windows95` (optional, string)
+ Response 200 (application/json) |
You can inherit parameters for an action from a resource currently. |
@FranklinYu Could be an option, but it still requires to duplicate descriptions and Responses for both sections |
Looks like there is no way to render a parameter with visible name not as a query parameter.
For example: I have a commits (
/commits
) resource withpage
andsize
query parameters. And I would like to have ability to filter commits byproject
, and I would like to have it as an optional path parameter with name, like/project/windows95/commits
. Is it possible?Maybe some form of "form-style path operator" (
{/project}
) could be introduced? Like:That will be rendered as:
/project/windows95/commits?page=1
The text was updated successfully, but these errors were encountered: