Skip to content

Commit

Permalink
Merge branch 'release/v2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
enfoqueNativo committed Jun 3, 2020
2 parents 035decd + 2b1816b commit f602b2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG
## v 2.0.4 18/05/2020
* Agrega la posibilidad de incluir referencias a tipos propios en el modelo

## v 2.0.3 18/05/2020
* Agrega template para un recurso que de información de la API (sirve como healthcheck)
* Agrega posibilidad de especificar un logo para la documentacion
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "siu-toba/rest",
"description": "Libreria para servicios REST",
"homepage": "http://toba.siu.edu.ar",
"license": "SIU",
"require": {
"php": ">=5.6.0",
"doctrine/cache": "~1.4",
Expand Down
4 changes: 3 additions & 1 deletion src/SIUToba/rest/lib/modelo_recursos.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ protected function get_property(&$properties, $campo, $def)
$property = array();
//TODO, hacer mas modelos para representar estos subrecursos? eso impacta en definiciones y herencia entre ellas?
if (isset($def['_compuesto'])) {
//$def = array('type' => $campo); //lo muestro asi por ahora
$aux = array();
$this->get_property($aux, $campo, $def['_compuesto']);
$def = array('type' => $aux);
Expand All @@ -57,6 +56,9 @@ protected function get_property(&$properties, $campo, $def)
foreach ($def as $k => $campo_def) {
if (strpos($k, '_') !== 0) {
$property[$k] = $campo_def;
if ($k == 'items' && is_array($campo_def) && isset($campo_def['$ref'])) { //Falta chequear tipo basico, queda proximo release
$property[$k] = array('$ref' => "#/definitions/". trim($campo_def['$ref']));
}
}
}
$properties[$campo] = $property;
Expand Down

0 comments on commit f602b2a

Please sign in to comment.