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

How to handle one off verbs and views? #142

Closed
sirwolfgang opened this issue Dec 22, 2014 · 6 comments
Closed

How to handle one off verbs and views? #142

sirwolfgang opened this issue Dec 22, 2014 · 6 comments

Comments

@sirwolfgang
Copy link

I apologize if I missed this in the documentation. I am trying to find a good way to express one off paths for verbs and other views. In these cases, examples below, I don't think it makes sense to separate them by a header, but am required to in order to specify the URL.

# Group Items
## Items [/items]
### Retrieve Items [GET]

## Item [/items/{id}]
### Retrieve an Item [GET]

## SKUs [/items/sku/{sku_number}]
### Retrieve an Item by SKU [GET]

## Inventories [/items/{id}/inventories]
### Retrieve an Item's Inventories [GET]

## Events [/items/{id}/events]
### Retrieve an Item's Events [GET]

## Warehouses [/items/{id}/warehouses]
### Retrieve an Item's Warehouses [GET]
@sirwolfgang sirwolfgang changed the title How to handle verbs and views? How to handle one off verbs and views? Dec 22, 2014
@LilyMGoh
Copy link
Contributor

@sirwolfgang If you don't care about the action names, you can use a shortcut like so:

# Group Items

# GET /items
+ Response 200 (text/plain)
...

# GET /item
+ Response 200 (text/plain)
...

Let me know if this is what you are looking for.

@sirwolfgang
Copy link
Author

I somewhat care about naming the actions, but when I do that I get this:

image

Which is being rendered by the Atom.io viewer. Might this be a bug with the viewer?

@Anahkiasen
Copy link

Wondering the same thing, there should be a way to name one-off actions, like:

# Get an user [GET /users/{user}]

Or something

@pksunkara
Copy link
Contributor

@sirwolfgang @Anahkiasen Do you guys think you can make use of the features proposed in #88?

@Anahkiasen
Copy link

Would work for me yup

@zdne zdne added the Duplicate label Apr 21, 2015
@zdne
Copy link
Contributor

zdne commented Apr 21, 2015

Addressed in #88.

@zdne zdne closed this as completed Apr 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants