Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Allow relative URIs #451

Open
alexkreidler opened this issue Dec 16, 2019 · 0 comments
Open

Allow relative URIs #451

alexkreidler opened this issue Dec 16, 2019 · 0 comments

Comments

@alexkreidler
Copy link

Right now, if I want to add a nested action to a resource, I need to do this:

## Apples [/apples]
### Get all apples [GET]
+ Response 200 (application/json)
    + Attributes (Apple)

### Pick another apple [GET /apples/pick]
+ Response 200 (application/json)
    + Attributes (Apple)

But I would like to do the following:

### Pick another apple [GET ./pick]

Which would generate the following actions: GET /apples and GET /apples/pick. I think a lot of people could find these relative URIs quite useful.

I recognize you would probably only want to allow URIs that are children/sub-paths of the resource group b/c otherwise it could get confusing, but I think this format of relative URLs makes a lot more sense for the resource-driven design that API Blueprint seems to be set on.

I don't really want to repeat the entire absolute URL if I am performing a specialized action on a deeply nested subresource.

Also, it seems a little counterintuitive that the spec allows for Action URIs which are not children of Resource URIs (e.g. I could have ## Pick Apples [GET /robot/picker/pick] underneath # Apples [/apples]). I guess there are use-cases for that as well.

I'd love thoughts on this. Also, thanks for making an awesome and flexible tool, my days of Swagger are done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant