diff --git a/build/api/core/Documentation.php b/build/api/core/Documentation.php index f71159e..9d1f0e9 100644 --- a/build/api/core/Documentation.php +++ b/build/api/core/Documentation.php @@ -37,7 +37,7 @@ foreach($cfg as $method=>$spec){ /* (1) Build uri with args */ - $cfg[$method]['uri_scheme'] = self::uri_with_parameters($rq->get('id')['path'], $spec); + $cfg[$method]['uri_scheme'] = self::uri_scheme($rq->get('id')['path'], $spec); /* (2) Build human-readable permission list */ $cfg[$method]['perm'] = "accessible with:".self::permissions($spec); @@ -59,7 +59,7 @@ * @spec Specification * ---------------------------------------------------------*/ - private static function uri_with_parameters($uri=null, $spec=null){ + private static function uri_scheme($uri=null, $spec=null){ /* (1) If no param return nothing */ if( !isset($spec['par']) || !is_array($spec['par']) || count($spec['par']) <= 0 ) @@ -99,11 +99,7 @@ /* (2.2) Define the 'optional' property */ $optional = ( isset($pspec['opt']) && $pspec['opt'] === true ) ? '?' : ''; - /* (2.3) Define the 'default' property */ - $optional .= ( $optional == '?' && isset($pspec['def']) ) ? json_encode($pspec['def']) : 'null'; - - - /* (2.4) If 'rename' set the rename content */ + /* (2.3) If 'rename' set the rename content */ if( isset($pspec['ren']) && is_string($pspec['ren']) ){ $uri .= '/@'.$pspec['ren']."$optional"; @@ -111,7 +107,7 @@ } - /* (2.5) If no rename set the default name */ + /* (2.4) If no rename set the default name */ $uri .= "/@url$i$optional"; }