-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c2522b
commit db696ea
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Api | ||
module V2 | ||
# Provides a JSON API controller for SubmissionPools | ||
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation | ||
class SubmissionPoolsController < JSONAPI::ResourceController | ||
# By default JSONAPI::ResourceController provides most the standard | ||
# behaviour, and in many cases this file may be left empty. | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
module Api | ||
module V2 | ||
# Provides a JSON:API representation of a {SubmissionPool}. | ||
# SubmissionPools are designed to view submissions in the context of a particular labware. | ||
# | ||
# @example GET request for all SubmissionPool resources | ||
# GET /api/v2/submission_pools/ | ||
# | ||
# @example GET request for a SubmissionPool with ID 123 | ||
# GET /api/v2/submission_pools/123/ | ||
# | ||
# @note This resource is immutable: its endpoint will not accept `POST`, `PATCH`, or `DELETE` requests. | ||
# @note Access this resource via the `/api/v2/submission_pools/` endpoint. | ||
# | ||
# Provides a JSON:API representation of {SubmissionPool}. | ||
# | ||
# For more information about JSON:API see the [JSON:API Specifications](https://jsonapi.org/format/) | ||
# or look at the [JSONAPI::Resources](http://jsonapi-resources.com/) package for Sequencescape's implementation | ||
# of the JSON:API standard. | ||
class SubmissionPoolResource < BaseResource | ||
immutable | ||
|
||
# @!attribute [w] plates_in_submission | ||
# @return [Integer] The number of plates in the submission pool. | ||
attribute :plates_in_submission, readonly: true | ||
|
||
# @!attribute [r] tag_layout_templates | ||
# @return [Array<TagLayoutTemplateResource>] The tag layout templates for this submission pool. | ||
has_many :tag_layout_templates, readonly: true | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters