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

Inline action syntax #159

Merged
merged 3 commits into from
Mar 11, 2015
Merged

Conversation

pksunkara
Copy link
Contributor

For @zdne to review & merge.

I was unable to decide about adding an example API showing the inline action in the examples folder. Please correct me if I am wrong, but the examples folder is for the major things, right?

@zdne
Copy link
Contributor

zdne commented Feb 25, 2015

"For @zdne to review & merge", again @kylef is fully capable of doing this as well :)

@zdne
Copy link
Contributor

zdne commented Feb 25, 2015

Please correct me if I am wrong, but the examples folder is for the major things, right?

I would say it is for any and all examples that are worthy. If they are part of the "course" they should be numbered where the lower number the more fundamental topic of the example (so maybe this is one with a fairly high number)


**-- or --**

Defined by an action [name (identifier)](#def-identifier) followed by an [HTTP request method][httpmethods] and [URI template][uritemplate] enclosed in square brackets `[]`. This is also known by the name *Inline Action*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "This is also known by the name Inline Action."

@zdne
Copy link
Contributor

zdne commented Feb 25, 2015

Blockers are my comments above and missing example both in specification and in the examples folder. Also it would be good to explain action a resource affordance represented by link transition. Distinguishing state transition within the same resource ## <identifier> [<HTTP request method>] and state transition that to another resource ## <identifier> [<HTTP request method> <URI template>].

Feel free to spend some time studying the state transition topic as it is fundamental principle of REST architecture.

@pksunkara pksunkara force-pushed the pksunkara/inline-action branch from 032ad34 to 6a26d7a Compare February 26, 2015 06:39
@pksunkara
Copy link
Contributor Author

Updated.

@pksunkara pksunkara force-pushed the pksunkara/inline-action branch 2 times, most recently from f49da92 to 915dc74 Compare February 27, 2015 07:10
@@ -0,0 +1,66 @@
FORMAT: 1A

# Inline Action API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So while we use this name "internally" I do not think we should communicate is as a (new) concept. There is no such a thing as inlined transitions or affordances. I would simply name this example as "Advanced Action"

@zdne
Copy link
Contributor

zdne commented Feb 27, 2015

Solid kick-off. Although I think in needs a little bit of touch – Since we are introducing the term "state transition" here for the first time, if I am correct, I think it would be good to mention somewhere in the lead that Action as such is a state transition..

@pksunkara pksunkara force-pushed the pksunkara/inline-action branch from 915dc74 to 1413bc0 Compare March 2, 2015 15:35
@pksunkara
Copy link
Contributor Author

Updated.

@pksunkara pksunkara force-pushed the pksunkara/inline-action branch from 1413bc0 to 2800182 Compare March 2, 2015 15:37
FORMAT: 1A

# Advanced Action API
An action in a resource in the API Blueprint can be considered as a state transition. This API example demonstrates that a resource can contain a state transition to another resource. This allows us to show that the resource `Task` can afford an action that is not limited to the resource `Task`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An action in a resource in the API Blueprint can be considered as a state transition

A resource action is – in fact – a state transition.

This API example demonstrates that a resource can contain a state transition to another resource.

This API example demonstrates an action – state transition – to another resource.

This allows us to show that the resource Task can afford an action that is not limited to the resource Task.

I would remove this sentence completely

@kylef
Copy link
Member

kylef commented Mar 5, 2015

In the specification's resource section (10), there is the following statement:

URI parameters discussed in the scope of a Resource section apply to any and all nested Action sections.

I think this needs to be reworded as I don't believe it applies anymore anymore, given the following example:

## User [/users/{username}]

+ Parameters
    + username...

### Create a User [POST /users]

@zdne
Copy link
Contributor

zdne commented Mar 6, 2015

I think this needs to be reworded as I don't believe it applies anymore anymore

@kylef good catch!

@pksunkara please take this into account

@pksunkara
Copy link
Contributor Author

Updated.

FORMAT: 1A

# Advanced Action API
A resource action is – in fact – a state transition. This API example demonstrates that an action - state transition - to another resource.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence does not make sense. Please re-read it loud & then improve it.

@zdne
Copy link
Contributor

zdne commented Mar 9, 2015

Please fix the example.

@pksunkara pksunkara force-pushed the pksunkara/inline-action branch from 51bd529 to 533de80 Compare March 9, 2015 12:42
@pksunkara
Copy link
Contributor Author

Oops. Forgot to remove the word that. Fixed now.

zdne added a commit that referenced this pull request Mar 11, 2015
@zdne zdne merged commit 4f2aa76 into zdne/attributes-description Mar 11, 2015
@zdne zdne deleted the pksunkara/inline-action branch March 11, 2015 14:06
zdne added a commit that referenced this pull request Mar 16, 2015
zdne added a commit that referenced this pull request Mar 17, 2015
zdne added a commit that referenced this pull request Mar 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants