Adrien Marquès
fcc8b39717
fix: ignore uri query for service pattern matching
2021-06-22 22:45:47 +02:00
Adrien Marquès
2b67655cfd
refactor: reduce cyclomatic complexity of service.validateInput()
...
- simplify matchPattern()
- rename isMethodAvailable() to checkMethod()
- rename isPatternValid() to checkPattern()
- rename validateInput() to checkInput()
- rename validateOutput() to checkOutput()
- refactor per-type input param management in new method parseParam(); that returns the param type (added unexported enum) and the error
- refactor collision detection from checkInput() and checkOutput() in new method nameConflicts()
2021-06-22 22:18:29 +02:00
Adrien Marquès
178d9a8eee
refactor: export config errors
2021-06-21 21:50:57 +02:00
Adrien Marquès
defa2c3645
refactor: rename semantics of datatype to validator.Type
2021-06-21 21:08:22 +02:00
Adrien Marquès
822ef823e9
migrate: symbols import paths to github
2021-06-20 21:29:46 +02:00
Adrien Marquès
30862195a1
config: refactor, simplify, test, remove redundant comments
2020-04-04 15:39:00 +02:00
Adrien Marquès
35ede5e266
unexport config errors
2020-04-04 14:34:20 +02:00
Adrien Marquès
1e0fb77d61
standardize and simplify the config package
2020-04-04 11:45:49 +02:00
Adrien Marquès
a5424d8941
parse output in internal/config to find the datatype's reflect.Type()
2020-03-29 16:59:32 +02:00
Adrien Marquès
ca2be1415d
enforce 'name' for capture or query parameters
2020-03-29 14:18:05 +02:00
Adrien Marquès
b15bb578ce
delegate from internal.service to parameter.Validate()
2020-03-29 14:12:47 +02:00
Adrien Marquès
76cc2f5279
replace datatype.Kind() with Type()
2020-03-28 19:11:23 +01:00
Adrien Marquès
8cfa2235d6
add Kind() method to datatype.T interface and to config parameter
2020-03-28 18:48:27 +01:00
Adrien Marquès
af3ffa7d6a
implement validator interface for config.service; rename for readability
2020-03-28 12:30:57 +01:00
Adrien Marquès
93b31b9718
keep references to Form parameters
2020-03-16 11:48:44 +01:00
Adrien Marquès
12417f7f1c
reference query parameters in config.Service
2020-03-16 11:32:37 +01:00
Adrien Marquès
e7f10723a6
check for undefined brace captures + make tests parallel
2020-03-16 10:56:26 +01:00
Adrien Marquès
c32b038da2
make splitURL public
2020-03-16 09:26:10 +01:00
Adrien Marquès
1b4922693b
move config -> internal.config and config.datatype to datatype
2020-03-16 09:20:00 +01:00
Adrien Marquès
a6f5083f0d
bcupdate: make config flat, rewrite, simplify, test
2020-03-14 15:24:17 +01:00
Adrien Marquès
4accad7286
refactor internal/config
...
- create cerr (constant errors) with wrapped context (service name, method, parameter name)
- fix comments numbering
- remove duplicate check
2020-03-08 16:26:55 +01: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
8109f57d15
ref 0: internal.apidef becomes internal.config + refactoe
2019-05-01 10:29:23 +02:00