Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 66a4d5ab authored by Vincent Hofman's avatar Vincent Hofman
Browse files

Add HTTP error codes in documentation + Fix Traceparent's regex

parent 411e4710
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"checks": [ "checks": [
{ {
"type": "REGEX", "type": "REGEX",
"regex": "^(?!f{2})([\\da-f]{2})-(?!f{32})([\\da-f]{32})-(?!f{16})([\\da-f]{16})-(?!f{2})([\\da-f]{2})$" "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
} }
] ]
}, },
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
"checks": [ "checks": [
{ {
"type": "REGEX", "type": "REGEX",
"regex": "^(?!f{2})([\\da-f]{2})-(?!f{32})([\\da-f]{32})-(?!f{16})([\\da-f]{16})-(?!f{2})([\\da-f]{2})$" "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
} }
] ]
}, },
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
"checks": [ "checks": [
{ {
"type": "REGEX", "type": "REGEX",
"regex": "^(?!f{2})([\\da-f]{2})-(?!f{32})([\\da-f]{32})-(?!f{16})([\\da-f]{16})-(?!f{2})([\\da-f]{2})$" "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
} }
] ]
}, },
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"checks": [ "checks": [
{ {
"type": "REGEX", "type": "REGEX",
"regex": "^(?!f{2})([\\da-f]{2})-(?!f{32})([\\da-f]{32})-(?!f{16})([\\da-f]{16})-(?!f{2})([\\da-f]{2})$" "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
} }
] ]
} }
......
...@@ -11,14 +11,14 @@ date: 2023-03-14 ...@@ -11,14 +11,14 @@ date: 2023-03-14
| id | Check's type | Value | Description | | id | Check's type | Value | Description |
|--- |--- |--- |--- | |--- |--- |--- |--- |
| GETMethodChecking | FIXEDVALUE | GET | HTTP method shall be GET | | GETMethodChecking | CLOSEDLIST | [GET,POST] | HTTP method shall be GET |
| HTTP1VersionChecking | FIXEDVALUE | HTTP/1.1 | The HTTP version shall be HTTP/1.1 | | HTTP1VersionChecking | FIXEDVALUE | HTTP/1.1 | The HTTP version shall be HTTP/1.1 |
| URIRegexChecking | REGEX | `^(\S)+\/FHIR-Resource$` | URI path of the request shall be followed by the mCSD resource | | URIRegexChecking | REGEX | `^(\S)+\/FHIR-Resource$` | URI path of the request shall be followed by the mCSD resource |
| HostChecking | REGEX | `^(http[s]?:\/\/)?[a-zA-Z0-9.\-\/]+(\:(\d)+)?$` | Host Shall be a server name | | HostChecking | REGEX | `^(http[s]?:\/\/)?[a-zA-Z0-9.\-\/]+(\:(\d)+)?$` | Host Shall be a server name |
| Authorization_parameter_presence | OCCURRENCE | 1..1 | The Authorization parameter is mandatory | | Authorization_parameter_presence | OCCURRENCE | 1..1 | The Authorization parameter is mandatory |
| Authorization_parameter_value | REGEX | `^Bearer\\ [-a-zA-Z0-9._~+\\/]+=*$` | Authorization parameter's value SHALL be Bearer, followed by the token. | | Authorization_parameter_value | REGEX | `^Bearer\\ [-a-zA-Z0-9._~+\\/]+=*$` | Authorization parameter's value SHALL be Bearer, followed by the token. |
| traceparent_parameter_presence | OCCURRENCE | 1..1 | The traceparent parameter is mandatory in the HTTP header| | traceparent_parameter_presence | OCCURRENCE | 1..1 | The traceparent parameter is mandatory in the HTTP header|
| traceparent_parameter_value | REGEX | `^(?!f{2})([\da-f]{2})-(?!f{32})([\da-f]{32})-(?!f{16})([\da-f]{16})-(?!f{2})([\da-f]{2})$` | traceparent parameter's value SHALL be as defined in fhir.ch, section [tracecontext](https://fhir.ch/ig/ch-epr-mhealth/tracecontext.html). | | traceparent_parameter_value | REGEX | `^(?!f{2})([\da-f]{2})-(?!0{32})([\da-f]{32})-(?!0{16})([\da-f]{16})-([\da-f]{2})$` | traceparent parameter's value SHALL be as defined in fhir.ch, section [tracecontext](https://fhir.ch/ig/ch-epr-mhealth/tracecontext.html). |
| _id_parameter_presence | OCCURENCE | 0..1 | _id parameter can be used only once. | | _id_parameter_presence | OCCURENCE | 0..1 | _id parameter can be used only once. |
| _id_parameter_value | REGEX | `^\S+$` | _id parameter is a token. | | _id_parameter_value | REGEX | `^\S+$` | _id parameter is a token. |
| _lastUpdated_parameter_presence | OCCURENCE | 0..1 | _lastUpdated parameter can be used only once. | | _lastUpdated_parameter_presence | OCCURENCE | 0..1 | _lastUpdated parameter can be used only once. |
...@@ -73,4 +73,13 @@ date: 2023-03-14 ...@@ -73,4 +73,13 @@ date: 2023-03-14
| speciality_parameter_presence | OCCURENCE | 0..1 | speciality parameter can be used only once. | | speciality_parameter_presence | OCCURENCE | 0..1 | speciality parameter can be used only once. |
| speciality_parameter_value | REGEX | `^\S+$` | speciality parameter is a token.| | speciality_parameter_value | REGEX | `^\S+$` | speciality parameter is a token.|
| _include__parameter_presence | OCCURENCE | 0..1 | _include parameter can be used only once. | | _include__parameter_presence | OCCURENCE | 0..1 | _include parameter can be used only once. |
| _include_parameter_value | REGEX | `^.+$` | _include parameter is a string.| | _include_parameter_value | REGEX | `^.+$` | _include parameter is a string.|
\ No newline at end of file
## Behaviour of simulators using this HTTP Validation profile
In case of error response from HTTP Validator, simulators shall sent these HTTP error codes :
| Assertion's id | HTTP error code |
|--- |--- |
| GETMethodChecking | 404 |
| Authorization_parameter_presence | 401 |
| Authorization_parameter_presence | 401 |
| All other assertions (default) | 400 |
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment