riboseinc / ribose-api

API for Ribose
0 stars 0 forks source link

PUT action already defined for resource "/invitations/join_space_request/{invitation_id}" validation error #37

Closed skalee closed 6 years ago

skalee commented 6 years ago

Validator says:

warning code 2 in line 3032 - action with method 'PUT' already defined for resource '/invitations/join_space_request/{invitation_id}':
    #### Updating pre-assigned role [PUT]

And indeed, document structure is like:

### Join Space Request [/invitations/join_space_request/{invitation_id}]
(Some text)
#### Accepting / Rejecting a.k.a Ignoring [PUT]
(Action description)
#### Updating pre-assigned role [PUT]
(Action description)

The action with method PUT is already defined, indeed.

ronaldtse commented 6 years ago

@skalee here I think @ribose-jeffreylau wanted to specify two different use cases for the same action. Is there a better way to specify this?

skalee commented 6 years ago

@ronaldtse @ribose-jeffreylau API Blueprint is about endpoints, so they should be documented together. There can be more than one request and more than one response for given endpoint, it's totally allowed. Also, requests and responses may be logically grouped, see https://apiblueprint.org/documentation/specification.html#def-action-section, esp. "Multiple Transaction Examples" near the end of that section.

ribose-jeffreylau commented 6 years ago

@skalee Yes, you're right. We can follow the style shown in the Multiple Transaction Examples. Thanks :)