Open
Conversation
sergiovier
reviewed
Jun 30, 2020
| $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia | ||
| $ex->configurar_respuesta($respuesta); | ||
| $this->logger->info("La api retorn� un error. Status: ".$respuesta->get_status()); | ||
| $this->logger->info(var_export($respuesta->get_data(), true)); |
Contributor
There was a problem hiding this comment.
Este logger es PSR? Se podría mandar en el contexto la data (si no complejiza)
| { | ||
| $list = array(); | ||
| $list['swagger'] = "2.0"; | ||
| $list['info'] = array('title' => 'API Title', 'version' => '1.0'); //TODO: Read from settings |
| return $s; | ||
| } | ||
| } | ||
| ?> No newline at end of file |
Contributor
There was a problem hiding this comment.
end tags?
Puede traer algún tema si se escapa un espacio al final. Recuerdo que php-cs-fixer ayuda a quitarlos...
c4bff0a to
d151655
Compare
- Transforma arrays => json en el constructor para evitar problema con stream. - Hace rewind del stream al recuperar el body para garantizar que recupere todo - Se adaptan la vista_json y vista_xml para que sigan devolviendo lo mismo que antes - rest_error::configurar_respuesta ahora recibe el parametro por referencia (por inmutabilidad de la rta)
…espuesta - Se agrega un json_decode a los test que recuperan el body de la respuesta directamente.
- Agrega 'use' faltantes - Fix al metodo respuesta::add_headers - Fix al metodo vista_respuesta::escribir_encabezados - Fix en metodos que no recibian la asignacion del objeto clonado - La clase 'rest.php' instancia el response de manera temprana, ya que el singleton no sirve con el esquema psr7. - Se envia la respuesta como parametro por referencia en rest_error::configurar_respuesta y proveedor_autenticacion::requerir_autenticacion
d151655 to
ab802db
Compare
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.