Adrien Marquès
9189babe20
test primitive types : bool, float64
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2020-03-02 22:49:17 +01:00
Adrien Marquès
dfa6cba137
fix parsing primitive types instead of erroring unknown type
2020-03-02 22:45:58 +01:00
Adrien Marquès
feec6e96d0
test bool slice vs. json bool slice
continuous-integration/drone/push Build is passing
Details
2020-03-02 22:42:59 +01:00
Adrien Marquès
c2a88f0d2d
test string slice vs. json string slice
2020-03-02 22:42:45 +01:00
Adrien Marquès
e1cdd1c2a3
fix parsing non-string slice values
...
- only string were parsed using wrapped json
- now we also keep primitive types
2020-03-02 22:42:17 +01:00
Adrien Marquès
4b89ed6421
remove outdated tests
continuous-integration/drone/push Build is passing
Details
2020-03-02 22:34:34 +01:00
Adrien Marquès
9bf7860dc9
[breaking] do not return first element of 1-sized slices as it, return a slice
...
continuous-integration/drone/push Build is failing
Details
- it is more consistent and does not rely of a "hidden" assomption.
- for consistency, it is also a better practice to always the same type when waiting to receive a slice ; the 1 element case should not break anything
2020-03-02 22:24:36 +01:00
Adrien Marquès
8779f9ca3a
fix returning first element of 1-sized slice instead of the slice
continuous-integration/drone/push Build is passing
Details
2020-03-02 22:20:28 +01:00
Adrien Marquès
2d1b1aad6d
test conversion from 1-sized slice to first element (bool vs json boolean primitive)
continuous-integration/drone/push Build is failing
Details
2020-03-02 22:19:28 +01:00
Adrien Marquès
0f599e58ce
test json invalid float primitives ; only valid when wrapped
continuous-integration/drone/push Build is passing
Details
2020-03-02 22:01:16 +01:00
Adrien Marquès
09b9eb2ae5
fix formatting type
2020-03-02 22:00:39 +01:00
Adrien Marquès
e2bda2b2dd
test json invalid boolean primitives ; only valid when wrapped
2020-03-02 21:56:05 +01:00
Adrien Marquès
c2e8efc82b
test string slice as string ; invalid json but valid when wrapped
2020-03-02 21:51:06 +01:00
Adrien Marquès
77dbc5663b
test simple string parameter
continuous-integration/drone/push Build is passing
Details
2020-03-01 21:34:14 +01:00
Adrien Marquès
22947db2b6
fix: mark parameter as parsed after successful parsing
...
- avoid parsing multiple times in a row ; it has no side-effect but is useless
- actually does not cause any issue, but for consistency sake!
2020-02-28 18:41:05 +01:00
Adrien Marquès
3e718c96e8
return error when parsing parameters
2020-02-28 17:50:55 +01:00
Adrien Marquès
e2e3799bc3
expand store.go coverage to 100% with a tricky test
...
continuous-integration/drone/push Build is passing
Details
- force http.Request.ParseForm to fail
2019-11-21 23:23:40 +01:00
Adrien Marquès
ee34abd424
replace bytes.NewBufferString() with strings.NewReader()
2019-11-21 23:23:14 +01:00
Adrien Marquès
017bfd45b4
test multipart body paramters
2019-11-21 23:23:04 +01:00
Adrien Marquès
635773218f
make internal/multipart use internal/cerr constant errors
...
continuous-integration/drone/push Build is passing
Details
- instead of defining its own
2019-11-21 22:35:00 +01:00
Adrien Marquès
4221f8cf2c
test internal/config trick to have a 100% coverage (as conflict check is undeterministic, merge all conditions)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2019-11-21 22:29:58 +01:00
Adrien Marquès
8ba58b4748
test internal/config empty parameter rename should not rename
2019-11-21 22:27:57 +01:00
Adrien Marquès
b18ea98497
remove dead code
2019-11-21 22:20:12 +01:00
Adrien Marquès
6218327fd2
expand internal/config test coverage
...
- make parameter type "?" invalid as it marks it as optional only
- check optional vs. required parameters
- test subservice in method description error check
2019-11-21 22:18:00 +01:00
Adrien Marquès
8cebf52405
add internal/config test for the Browse() method
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2019-11-21 22:00:48 +01:00
Adrien Marquès
aada9edff5
test internal/config parsing and illegal/missing fields
2019-11-21 21:48:24 +01:00
Adrien Marquès
52b42e479a
parameter name conflict: on rename conflicting rename, return original name
2019-11-21 21:34:25 +01:00
Adrien Marquès
19e203c364
refactor internal/config
...
- create cerr (constant errors) with wrapped context (service name, method, parameter name)
- fix comments numbering
- remove duplicate check
2019-11-21 21:29:23 +01:00
Adrien Marquès
28d11b840f
test internal/cerr package + add WrapString() to use a raw string
continuous-integration/drone/push Build is passing
Details
2019-11-21 20:51:29 +01:00
Adrien Marquès
a54c428670
Test json: add a check with invalid json (no parameter is parsed)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2019-11-19 17:00:11 +01:00
Adrien Marquès
0a470dbd40
Test json body parameters
continuous-integration/drone/push Build is passing
Details
2019-11-19 16:57:23 +01:00
Adrien Marquès
24b0eaa68b
Test with url encoded body parameters
2019-11-19 16:53:02 +01:00
Adrien Marquès
da1ee37612
Test store agains Query parameters
continuous-integration/drone/push Build is passing
Details
2019-11-19 16:18:56 +01:00
Adrien Marquès
f272f880e8
Test store with uri arguments
2019-11-19 16:18:50 +01:00
Adrien Marquès
36008db9e5
Test empty store -> fix
2019-11-19 16:18:45 +01:00
Adrien Marquès
8a1144a187
merge parseParameter
2019-11-19 16:18:27 +01:00
Adrien Marquès
be84c86172
fix: use t.Run in tests instead of for{} with i
2019-05-05 19:01:54 +02:00
Adrien Marquès
21f48a65ee
feat: parallelize tests +ci
2019-05-05 19:01:54 +02:00
Adrien Marquès
bf3e651c2c
ref: clean comments and make errors constants
2019-05-05 19:01:54 +02:00
Adrien Marquès
eb5ce4c0d0
fix: semantic renaming : internal.config.Method.Permission is now Scope
2019-05-05 19:01:54 +02:00
Adrien Marquès
189d3b40a6
fix: semantic (comments) renaming : 'controller' to 'service', more explicit names
2019-05-05 19:01:54 +02:00
Adrien Marquès
0e498607ba
clean
2019-05-05 19:01:54 +02:00
Adrien Marquès
b9f240b86b
feat: fix error creation to bind arguments directly + add optional error argument in NewResponse()
2019-05-05 19:01:54 +02:00
Adrien Marquès
cd2bcdd8bc
ref 0: first working version ; totest
2019-05-01 15:14:49 +02:00
Adrien Marquès
7e66b6ddd5
ref 0: big refactor of concerns between api request, server, etc
2019-05-01 13:44:45 +02:00
Adrien Marquès
16d3399ee9
ref 0: internal.checker renamed typecheck (no more internal)
2019-05-01 11:28:55 +02:00
Adrien Marquès
8d45d3241b
ref 0: internal.checker defines an interface ; default types are in internal.checker.builtin
2019-05-01 11:23:05 +02:00
Adrien Marquès
8109f57d15
ref 0: internal.apidef becomes internal.config + refactoe
2019-05-01 10:29:23 +02:00
Adrien Marquès
a63e227538
ref 0: internal/request
2019-05-01 00:02:28 +02:00
Adrien Marquès
0eee615aea
rename 'internal/api' to 'internal/apidef' (api definition)
2018-10-07 11:40:35 +02:00