Api documentation fixes (#2646)

* Fix the API documentation for Chain Validate (v1/chain/validate).  It was documented as a POST, but it is actually a GET request, which can be seen in its handler ChainValidationHandler
* Update the API V1 route list response to include the headers and merkleproof routes.  Also clarify that for the chain/outputs route you must specify either byids or byheight to select outputs.
This commit is contained in:
Agreene
2019-03-10 20:18:21 -07:00
committed by Ignotus Peverell
parent 42fee8d1a5
commit a7a160a5d4
2 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -103,16 +103,19 @@ pub fn build_router(
) -> Result<Router, RouterError> {
let route_list = vec![
"get blocks".to_string(),
"get headers".to_string(),
"get chain".to_string(),
"post chain/compact".to_string(),
"post chain/validate".to_string(),
"get chain/outputs".to_string(),
"get chain/validate".to_string(),
"get chain/outputs/byids?id=xxx,yyy,zzz".to_string(),
"get chain/outputs/byheight?start_height=101&end_height=200".to_string(),
"get status".to_string(),
"get txhashset/roots".to_string(),
"get txhashset/lastoutputs?n=10".to_string(),
"get txhashset/lastrangeproofs".to_string(),
"get txhashset/lastkernels".to_string(),
"get txhashset/outputs?start_index=1&max=100".to_string(),
"get txhashset/merkleproof?n=1".to_string(),
"get pool".to_string(),
"post pool/push".to_string(),
"post peers/a.b.c.d:p/ban".to_string(),