api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

015_update_types_table.log 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. ===
  2. POST /columns
  3. {"name":"types","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"integer","type":"integer"},{"name":"bigint","type":"bigint"},{"name":"varchar","type":"varchar","length":10},{"name":"decimal","type":"decimal","precision":10,"scale":4},{"name":"float","type":"float"},{"name":"double","type":"double"},{"name":"boolean","type":"boolean"},{"name":"date","type":"date"},{"name":"time","type":"time"},{"name":"timestamp","type":"timestamp"},{"name":"clob","type":"clob"},{"name":"blob","type":"blob"},{"name":"geometry","type":"geometry"}]}
  4. ===
  5. 200
  6. Content-Type: application/json
  7. Content-Length: 4
  8. true
  9. ===
  10. POST /records/types
  11. Content-Type: application/json
  12. {"integer":2,"bigint":3,"varchar":"abc","decimal":"1.23","float":1,"double":23.45,"boolean":true,"date":"1970-01-01","time":"00:00:01","timestamp":"2001-02-03 04:05:06","clob":"a","blob":"YQ==","geometry":"POINT(1 2)"}
  13. ===
  14. 200
  15. Content-Type: application/json
  16. Content-Length: 1
  17. 1
  18. ===
  19. PUT /records/types/1
  20. {"integer":2,"bigint":2,"varchar":"b","decimal":2,"float":2,"double":2,"boolean":false,"date":"2000-01-02","time":"02:01:01","timestamp":"2000-01-02 02:01:01","clob":"b","blob":"Cg==","geometry":"POINT(2 2)"}
  21. ===
  22. 200
  23. Content-Type: application/json
  24. Content-Length: 1
  25. 1
  26. ===
  27. GET /records/types/1
  28. ===
  29. 200
  30. Content-Type: application/json
  31. Content-Length: 222
  32. {"id":1,"integer":2,"bigint":2,"varchar":"b","decimal":"2.0000","float":2,"double":2,"boolean":false,"date":"2000-01-02","time":"02:01:01","timestamp":"2000-01-02 02:01:01","clob":"b","blob":"Cg==","geometry":"POINT(2 2)"}
  33. ===
  34. PUT /records/types/1
  35. {"integer":3,"bigint":3,"varchar":"c","decimal":3,"float":3,"double":3,"boolean":true,"date":"2000-01-03","time":"03:01:01","timestamp":"2000-01-03 03:01:01","clob":"c","blob":"Yw==","geometry":"POINT(3 3)"}
  36. ===
  37. 200
  38. Content-Type: application/json
  39. Content-Length: 1
  40. 1
  41. ===
  42. GET /records/types/1
  43. ===
  44. 200
  45. Content-Type: application/json
  46. Content-Length: 221
  47. {"id":1,"integer":3,"bigint":3,"varchar":"c","decimal":"3.0000","float":3,"double":3,"boolean":true,"date":"2000-01-03","time":"03:01:01","timestamp":"2000-01-03 03:01:01","clob":"c","blob":"Yw==","geometry":"POINT(3 3)"}
  48. ===
  49. PUT /records/types/1
  50. {"integer":"string"}
  51. ===
  52. 422
  53. Content-Type: application/json
  54. Content-Length: 101
  55. {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"must be numeric"}}
  56. ===
  57. PUT /records/types/1
  58. {"bigint":"string"}
  59. ===
  60. 422
  61. Content-Type: application/json
  62. Content-Length: 100
  63. {"code":1013,"message":"Input validation failed for 'types'","details":{"bigint":"must be numeric"}}
  64. ===
  65. PUT /records/types/1
  66. {"varchar":"12345678901"}
  67. ===
  68. 422
  69. Content-Type: application/json
  70. Content-Length: 94
  71. {"code":1013,"message":"Input validation failed for 'types'","details":{"varchar":"too long"}}
  72. ===
  73. PUT /records/types/1
  74. {"decimal":"string"}
  75. ===
  76. 422
  77. Content-Type: application/json
  78. Content-Length: 97
  79. {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"not a float"}}
  80. ===
  81. PUT /records/types/1
  82. {"float":"string"}
  83. ===
  84. 422
  85. Content-Type: application/json
  86. Content-Length: 95
  87. {"code":1013,"message":"Input validation failed for 'types'","details":{"float":"not a float"}}
  88. ===
  89. PUT /records/types/1
  90. {"double":"string"}
  91. ===
  92. 422
  93. Content-Type: application/json
  94. Content-Length: 96
  95. {"code":1013,"message":"Input validation failed for 'types'","details":{"double":"not a float"}}
  96. ===
  97. PUT /records/types/1
  98. {"boolean":-1}
  99. ===
  100. 422
  101. Content-Type: application/json
  102. Content-Length: 105
  103. {"code":1013,"message":"Input validation failed for 'types'","details":{"boolean":"not a valid boolean"}}
  104. ===
  105. PUT /records/types/1
  106. {"boolean":null}
  107. ===
  108. 422
  109. Content-Type: application/json
  110. Content-Length: 100
  111. {"code":1013,"message":"Input validation failed for 'types'","details":{"boolean":"cannot be null"}}
  112. ===
  113. PUT /records/types/1
  114. {"date":"string"}
  115. ===
  116. 422
  117. Content-Type: application/json
  118. Content-Length: 117
  119. {"code":1013,"message":"Input validation failed for 'types'","details":{"date":"invalid date format use yyyy-mm-dd"}}
  120. ===
  121. PUT /records/types/1
  122. {"date":"still-no-date"}
  123. ===
  124. 422
  125. Content-Type: application/json
  126. Content-Length: 99
  127. {"code":1013,"message":"Input validation failed for 'types'","details":{"date":"not a valid date"}}
  128. ===
  129. PUT /records/types/1
  130. {"time":"string"}
  131. ===
  132. 422
  133. Content-Type: application/json
  134. Content-Length: 115
  135. {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"invalid time format use hh:mm:ss"}}
  136. ===
  137. PUT /records/types/1
  138. {"time":"still:no:time"}
  139. ===
  140. 422
  141. Content-Type: application/json
  142. Content-Length: 105
  143. {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"non-numeric time value"}}
  144. ===
  145. PUT /records/types/1
  146. {"time":"999:999:999"}
  147. ===
  148. 422
  149. Content-Type: application/json
  150. Content-Length: 99
  151. {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"not a valid time"}}
  152. ===
  153. PUT /records/types/1
  154. {"timestamp":"string"}
  155. ===
  156. 422
  157. Content-Type: application/json
  158. Content-Length: 136
  159. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"invalid timestamp format use yyyy-mm-dd hh:mm:ss"}}
  160. ===
  161. PUT /records/types/1
  162. {"timestamp":"string 01:01:01"}
  163. ===
  164. 422
  165. Content-Type: application/json
  166. Content-Length: 122
  167. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"invalid date format use yyyy-mm-dd"}}
  168. ===
  169. PUT /records/types/1
  170. {"timestamp":"still-no-date 01:01:01"}
  171. ===
  172. 422
  173. Content-Type: application/json
  174. Content-Length: 104
  175. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"not a valid date"}}
  176. ===
  177. PUT /records/types/1
  178. {"timestamp":"2001-01-01 string"}
  179. ===
  180. 422
  181. Content-Type: application/json
  182. Content-Length: 120
  183. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"invalid time format use hh:mm:ss"}}
  184. ===
  185. PUT /records/types/1
  186. {"timestamp":"2001-01-01 still:no:time"}
  187. ===
  188. 422
  189. Content-Type: application/json
  190. Content-Length: 110
  191. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"non-numeric time value"}}
  192. ===
  193. PUT /records/types/1
  194. {"timestamp":"2001-01-01 999:999:999"}
  195. ===
  196. 422
  197. Content-Type: application/json
  198. Content-Length: 104
  199. {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"not a valid time"}}
  200. ===
  201. PUT /records/types/1
  202. {"clob":"HLnVf8PrxX/vPMElDxrlFLIHoBd1fnLVSXVEDLjt0bk="}
  203. ===
  204. 200
  205. Content-Type: application/json
  206. Content-Length: 1
  207. 1
  208. ===
  209. PUT /records/types/1
  210. {"blob":"T8O5IGVzdCBsZSBjYWbDqSBsZSBwbHVzIHByb2NoZT8="}
  211. ===
  212. 200
  213. Content-Type: application/json
  214. Content-Length: 1
  215. 1
  216. ===
  217. GET /records/types/1
  218. ===
  219. 200
  220. Content-Type: application/json
  221. Content-Length: 305
  222. {"id":1,"integer":3,"bigint":3,"varchar":"c","decimal":"3.0000","float":3,"double":3,"boolean":true,"date":"2000-01-03","time":"03:01:01","timestamp":"2000-01-03 03:01:01","clob":"HLnVf8PrxX\/vPMElDxrlFLIHoBd1fnLVSXVEDLjt0bk=","blob":"T8O5IGVzdCBsZSBjYWbDqSBsZSBwbHVzIHByb2NoZT8=","geometry":"POINT(3 3)"}
  223. ===
  224. DELETE /columns/types
  225. ===
  226. 200
  227. Content-Type: application/json
  228. Content-Length: 4
  229. true