diff --git a/Makefile b/Makefile index a8b8477e..359126ab 100644 --- a/Makefile +++ b/Makefile @@ -112,50 +112,62 @@ schema-all: schema-errors schema-get-consent: - @for file in specification/examples/responses/GET_Consent/*.yaml; do \ + @find specification/examples/responses/GET_Consent -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ - poetry run python scripts/validate_schema.py consent "$$(realpath $$file)"; \ + if echo "$$file" | grep -q "error"; then \ + poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ + else \ + poetry run python scripts/validate_schema.py consent "$$(realpath $$file)"; \ + fi; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-post-consent: - @for file in specification/examples/responses/POST_Consent/*.yaml; do \ + @find specification/examples/responses/POST_Consent -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-patch-consent: - @for file in specification/examples/responses/PATCH_Consent/*.yaml; do \ + @find specification/examples/responses/PATCH_Consent -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-related-person: - @for file in specification/examples/responses/GET_RelatedPerson/*.yaml; do \ + @find specification/examples/responses/GET_RelatedPerson -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ - poetry run python scripts/validate_schema.py relatedperson "$$(realpath $$file)"; \ + if echo "$$file" | grep -q "error"; then \ + poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ + else \ + poetry run python scripts/validate_schema.py relatedperson "$$(realpath $$file)"; \ + fi; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-questionnaire: - @for file in specification/examples/responses/POST_QuestionnaireResponse/*.yaml; do \ + @find specification/examples/responses/POST_QuestionnaireResponse -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-errors: - @for file in specification/examples/responses/errors/*.yaml; do \ + @find specification/examples/responses/errors -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ echo -e "$(GREEN)Success!$(RESET)"; \ done schema-get-questionnaire: - @for file in specification/examples/responses/GET_QuestionnaireResponse/*.yaml; do \ + @find specification/examples/responses/GET_QuestionnaireResponse -name "*.yaml" -type f | while read file; do \ echo "Processing $$file"; \ - poetry run python scripts/validate_schema.py questionnaireresponse "$$(realpath $$file)"; \ + if echo "$$file" | grep -q "error"; then \ + poetry run python scripts/validate_schema.py operationoutcome "$$(realpath $$file)"; \ + else \ + poetry run python scripts/validate_schema.py questionnaireresponse "$$(realpath $$file)"; \ + fi; \ echo -e "$(GREEN)Success!$(RESET)"; \ done diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index f58adc7d..ddbff7cb 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -152,7 +152,7 @@ info: [![Import Postman Collection](https://img.shields.io/badge/Import-Postman%20Collection-orange?logo=postman)](https://raw.githubusercontent.com/NHSDigital/validated-relationships-service-api/master/postman/validated_relationship_service.sandbox.postman_collection.json) Import the postman collection to run requests against sandbox. - + ### Integration testing Our [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing) @@ -2511,37 +2511,14 @@ components: type: string description: FHIR error code. enum: - - invalid - - structure - - required - - value - - invariant - - security - - login - - unknown - - expired - - forbidden - - suppressed - - processing - - not-supported - - duplicate - - multiple-matches - - not-found - - deleted - - too-long - - code-invalid - - extension - - too-costly - - business-rule - - conflict - - transient - - lock-error - - no-store - exception - - timeout - - incomplete - - throttled + - forbidden - informational + - invalid + - not-found + - not-supported + - processing + - required details: type: object description: Internal error code. @@ -2567,8 +2544,10 @@ components: type: string description: Additional diagnostic information about the issue. This information is subject to change. expression: - type: string + type: array description: FHIRPath of element(s) related to the error. + items: + type: string Reference: type: object