Skip to content

Commit

Permalink
Use standard HTTP error code. (#3)
Browse files Browse the repository at this point in the history
- do not return 200 OK on error
- keep empty or custom body on generic errors
- remove XML content
  • Loading branch information
ggrebert authored Dec 13, 2022
1 parent ea327ee commit 6b30578
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions E-Intervention-v1.0.0.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
"description": "Opération permettant à l'opérateur commercial de déclarer des clients HS auprès de l'OI",
"operationId": "notifier_Clients_HS_OC",
"consumes": [
"application/json",
"application/xml"
"application/json"
],
"produces": [
"application/xml",
"application/json"
],
"parameters": [
Expand All @@ -56,7 +54,10 @@
}
},
"400": {
"description": "Bad request"
"description": "Bad request",
"schema": {
"$ref": "#/definitions/reponse_Client_HS_OC_Par_Inter"
}
},
"401": {
"description": "Unauthorized"
Expand All @@ -65,10 +66,13 @@
"description": "Forbidden"
},
"404": {
"description": "Référence refIntervOI inconnue"
"description": "Not found",
"schema": {
"$ref": "#/definitions/reponse_Client_HS_OC_Par_Inter"
}
},
"405": {
"description": "Validation exception"
"description": "Method Not Allowed"
},
"500": {
"description": "Internal Server Error"
Expand All @@ -92,12 +96,10 @@
"description": "Opération permettant au DO de créer et mettre à jour une intervention chez l’OI",
"operationId": "declarer_Intervention_DO",
"consumes": [
"application/json",
"application/xml"
"application/json"
],
"produces": [
"application/json",
"application/xml"
"application/json"
],
"parameters": [
{
Expand All @@ -118,16 +120,25 @@
}
},
"400": {
"description": "Bad request"
"description": "Bad request",
"schema": {
"$ref": "#/definitions/reponse_Intervention_DO"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/reponse_Intervention_DO"
}
},
"405": {
"description": "Validation exception"
"description": "Method Not Allowed"
},
"500": {
"description": "Internal Server Error"
Expand All @@ -151,8 +162,7 @@
"description": "Opération permettant à l'OI de créer et mettre à jour une intervention chez l’OC",
"operationId": "declarer_Intervention_OI",
"consumes": [
"application/json",
"application/xml"
"application/json"
],
"parameters": [
{
Expand All @@ -173,16 +183,25 @@
}
},
"400": {
"description": "Bad request"
"description": "Bad request",
"schema": {
"$ref": "#/definitions/reponse_Intervention_OI"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/reponse_Intervention_OI"
}
},
"405": {
"description": "Validation exception"
"description": "Method Not Allowed"
},
"500": {
"description": "Internal Server Error"
Expand Down Expand Up @@ -233,9 +252,6 @@
"$ref": "#/definitions/client_HS_OC"
}
}
},
"xml": {
"name": "client_HS_OC_Par_Inter"
}
},
"client_HS_OC": {
Expand Down Expand Up @@ -273,11 +289,8 @@
"HMS_Coupure": {
"type": "string",
"format": "date-time",
"description": "Date/heure de début de coupure pour le client (format selon la norme ISO 8601) \n"
"description": "Date/heure de début de coupure pour le client (format selon la norme ISO 8601)\n"
}
},
"xml": {
"name": "client_HS_OC"
}
},
"intervention_DO": {
Expand Down Expand Up @@ -327,9 +340,6 @@
"format": "date-time",
"description": "Valeur NULL si M1 Date/heure de fin réel d'intervention si M3 (format selon la norme ISO 8601)\n"
}
},
"xml": {
"name": "intervention_DO"
}
},
"intervention_OI": {
Expand Down Expand Up @@ -372,9 +382,6 @@
"format": "date-time",
"description": "Valeur NULL si M2 Date/heure de fin réel d'intervention si M4 (format selon la norme ISO 8601)\n"
}
},
"xml": {
"name": "intervention_OI"
}
},
"nature_PBO_PTO": {
Expand Down Expand Up @@ -406,9 +413,6 @@
"maxLength": 50,
"description": "Référence PTO (Ex: FI-YYYY-YYYY) si disponible\n"
}
},
"xml": {
"name": "nature_PBO_PTO"
}
},
"PBO": {
Expand All @@ -419,9 +423,6 @@
"maxLength": 50,
"description": "Référence du PBO (ex: PTXXXXXXX) si fourni par le DO\n"
}
},
"xml": {
"name": "PBO"
}
},
"reponse_Client_HS_OC_Par_Inter": {
Expand Down

0 comments on commit 6b30578

Please sign in to comment.