#!/usr/bin/env bash # Deployment metadata only; each application remains independently published and configured. all_services=(api-gateway patient-profile observation insights health-overview) select_services() { local requested="$1" item selected_services=() if [[ "$requested" == all ]]; then selected_services=("${all_services[@]}") return fi IFS=',' read -r -a selected_services <<< "$requested" [[ ${#selected_services[@]} -gt 0 && "$requested" != *, ]] || fail "Select services by comma-separated name or all." local seen=, for item in "${selected_services[@]}"; do case "$item" in api-gateway|patient-profile|observation|insights|health-overview) ;; *) fail "Unknown service: $item" ;; esac case "$seen" in *,$item,*) fail "Repeated service: $item";; esac seen+="$item," done } assembly_for() { case "$1" in api-gateway) printf '%s' ApiGateway;; patient-profile) printf '%s' PatientProfileService;; observation) printf '%s' ObservationService;; insights) printf '%s' InsightsService;; health-overview) printf '%s' HealthOverviewService;; esac }