README.markdown in yard-rest-plugin-0.2.1 vs README.markdown in yard-rest-plugin-0.2.2

- old
+ new

@@ -24,10 +24,14 @@ - @topic topic. Specifies the topic to categorise a **class** (not a method) under. - @argument [type] name description. Specifies an argument that is passed to the service. You can specify as many of these as required +- @example_request example. An example of the request that is send to the service + +- @request_field name description. Further specifies the fields that are send within the request + - @example_response example. An example of the response that is returned from the service - @response_field name description. Further specifies the fields that are returned within the response ## Ignored Documentation @@ -39,19 +43,33 @@ ## Example: ## # Retuns all samples, as XML, for the current user that match the given parameters. # - # @url - # [GET] /samples/index.[format]?[arguments] + # @url [GET] /samples.[format]?[arguments] + # @url [GET] /samples/index.[format]?[arguments] # # @argument [String] format Only "xml" is support at this time. # @argument [String] name The name of the sample # @argument [String] reource The resource that sample belongs to - # @argument ["@assigned"|"@complete"|"!@complete"] search Return jobs that are assigned, complete, or + # @argument ["@assigned"|"@complete"|"!@complete"] search Return samples that are assigned, complete, or # uncomplete. - # + # + # @example_request + # <samples type="array"> + # <sample> + # <id>961</id> + # <name>My Sample</name> + # <state>complete</state> + # <last_unassigned_user_id type="integer"></last_unassigned_user_id> + # <resource_id type="integer">127</resource_id> + # <notes></notes> + # <updated_at type="datetime">2010-03-09T20:43:29Z</updated_at> + # <created_at type="datetime">2010-03-09T20:43:16Z</created_at> + # </interval> + # <intervals> + # # @example_response # <samples type="array"> # <sample> # <id>961</id> # <name>My Sample</name> @@ -70,9 +88,66 @@ # @response_field notes Any notes given for the sample # @response_field updated_at The Date/Time (in ISO8601) that the Sample was last updated # @response_field created_at The Date/Time (in ISO8601) that the Sample was created # def index + end + + ## + # Retuns all samples, as XML, for the current user that match the given parameters. + # + # @url [POST] /samples.[format]?[arguments] + # + # @argument [String] format Only "xml" is support at this time. + # + # @example_request + # <sample> + # <id>961</id> + # <name>My Sample</name> + # <state>complete</state> + # <last_unassigned_user_id type="integer"></last_unassigned_user_id> + # <resource_id type="integer">127</resource_id> + # <note_attributes type="array"> + # <note> + # <id>new_123</id> + # <text>Note One</note> + # </note> + # </note_attributes> + # <updated_at type="datetime">2010-03-09T20:43:29Z</updated_at> + # <created_at type="datetime">2010-03-09T20:43:16Z</created_at> + # </sample> + # + # @request_field id A unique ID identifying the Sample + # @request_field name The name of the sample + # @request_field state The current status of the Sample. Can be complete, uncomplete, etc. + # @request_field note_attributes Any notes given for the sample that will be created + # @request_field updated_at The Date/Time (in ISO8601) that the Sample was last updated + # @request_field created_at The Date/Time (in ISO8601) that the Sample was created + # + # @example_response + # <sample> + # <id>961</id> + # <name>My Sample</name> + # <state>complete</state> + # <last_unassigned_user_id type="integer"></last_unassigned_user_id> + # <resource_id type="integer">127</resource_id> + # <notes type="array"> + # <note> + # <text>Note One</note> + # </note> + # </notes> + # <updated_at type="datetime">2010-03-09T20:43:29Z</updated_at> + # <created_at type="datetime">2010-03-09T20:43:16Z</created_at> + # </sample> + # + # @response_field id A unique ID identifying the Sample + # @response_field name The name of the sample + # @response_field state The current status of the Sample. Can be complete, uncomplete, etc. + # @response_field notes Any notes given for the sample + # @response_field updated_at The Date/Time (in ISO8601) that the Sample was last updated + # @response_field created_at The Date/Time (in ISO8601) that the Sample was created + # + def create end ## Development You can run the template locally over the included sample code by using the following rake tasks: