Skip to content

Commit

Permalink
Only validate ooapi fields passed on to rio (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemare authored Jun 25, 2024
1 parent 6d0003a commit 09567f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
15 changes: 0 additions & 15 deletions src/nl/surf/eduhub_rio_mapper/specs/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"Common specs for use in the ooapi namespaces."
(:require [clojure.spec.alpha :as s]
[nl.surf.eduhub-rio-mapper.ooapi.common.LongLanguageTypedString :as-alias LongLanguageTypedString]
[nl.surf.eduhub-rio-mapper.ooapi.common.UnlimitedLanguageTypedString :as-alias UnlimitedLanguageTypedString]
[nl.surf.eduhub-rio-mapper.ooapi.enums :as enums]
[nl.surf.eduhub-rio-mapper.ooapi.LanguageTypedString :as-alias LanguageTypedString]
[nl.surf.eduhub-rio-mapper.ooapi.LanguageTypedStringEN :as-alias LanguageTypedStringEN]
Expand Down Expand Up @@ -122,20 +121,6 @@
(s/def ::LongLanguageTypedStrings
(s/coll-of ::LongLanguageTypedString))

(s/def ::UnlimitedLanguageTypedString/language
(re-spec #"^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"))

(s/def ::UnlimitedLanguageTypedString/value
string?)

(s/def ::UnlimitedLanguageTypedString
(s/keys :req-un [::UnlimitedLanguageTypedString/language
::UnlimitedLanguageTypedString/value]))

;; A collection of language typed strings with any set of languages
(s/def ::UnlimitedLanguageTypedStrings
(s/coll-of ::UnlimitedLanguageTypedString))

;; A collection of language typed strings with at least one dutch or
;; english entry
(s/def ::nlOrEnLanguageTypedStrings
Expand Down
16 changes: 0 additions & 16 deletions src/nl/surf/eduhub_rio_mapper/specs/program.clj
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@
(text-spec 1 40))

(s/def ::acceleratedRoute enums/acceleratedRoute)
(s/def ::admissionRequirements ::common/UnlimitedLanguageTypedStrings)
(s/def ::assessment ::common/LanguageTypedStrings)
(s/def ::children (s/coll-of ::common/uuid))
(s/def ::consentParticipationSTAP enums/consentParticipationSTAP)
(s/def ::coordinators (s/coll-of string?))
(s/def ::deficiency enums/deficiency)
(s/def ::description ::common/LongLanguageTypedStrings)
(s/def ::educationLocationCode string?)
(s/def ::educationSpecification ::common/uuid)
(s/def ::enrollment ::common/LanguageTypedStrings)
(s/def ::firstStartDate ::common/date)
(s/def ::foreignPartner string?)
(s/def ::foreignPartners (s/coll-of ::foreignPartner))
Expand All @@ -44,16 +40,12 @@
(s/def ::link string?)
(s/def ::modeOfStudy enums/modeOfStudy)
(s/def ::name ::common/LanguageTypedStrings)
(s/def ::organization string?)
(s/def ::parent string?)
(s/def ::primaryCode ::common/codeTuple)
(s/def ::programId ::common/uuid)
(s/def ::programType enums/programType)
(s/def ::propaedeuticPhase enums/propaedeuticPhase)
(s/def ::qualificationAwarded string?)
(s/def ::qualificationRequirements ::common/LanguageTypedStrings)
(s/def ::requirementsActivities enums/requirementsActivities)
(s/def ::resources (s/coll-of string?))
(s/def ::studyChoiceCheck enums/studyChoiceCheck)
(s/def ::teachingLanguage (re-spec #"[a-z]{3}"))
(s/def ::validFrom ::common/date)
Expand Down Expand Up @@ -94,20 +86,12 @@
::name
::validFrom]
:opt-un [::abbreviation
::admissionRequirements
::assessment
::children
::coordinators
::description
::common/duration
::enrollment
::link
::modeOfStudy
::organization
::parent
::qualificationAwarded
::qualificationRequirements
::resources
::teachingLanguage
::common/addresses
::common/fieldsOfStudy
Expand Down

0 comments on commit 09567f5

Please sign in to comment.