/
subjects.clj
37 lines (26 loc) · 1.03 KB
/
subjects.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(ns common-swagger-api.schema.subjects
(:use [common-swagger-api.schema :only [describe]])
(:require [schema.core :as s]))
(s/defschema Subject
{:id
(describe String "The subject ID")
(s/optional-key :name)
(describe String "The subject name")
(s/optional-key :first_name)
(describe String "The subject's first name")
(s/optional-key :last_name)
(describe String "The subject's last name")
(s/optional-key :email)
(describe String "The subject email")
(s/optional-key :institution)
(describe String "The subject institution")
(s/optional-key :attribute_values)
(describe [String] "A list of additional attributes applied to the subject")
(s/optional-key :description)
(describe String "The subject description")
:source_id
(describe String "The ID of the source of the subject information")})
(s/defschema SubjectList
{:subjects (describe [Subject] "The list of subjects in the result set")})
(s/defschema SubjectIdList
{:subject_ids (describe [String] "The list of subject IDs")})