This repository was archived by the owner on May 28, 2023. It is now read-only.
Corrige mimetype do get datasets #46
Merged
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 PR #45 acabou passando despercebido que o
GET /datasets
estava retornando um JSON mas com o mimetypeplain/text
. Eu havia sugerido a edição do retorno doget_datasets
pra usar o schema marshmallow pra gerar o JSON, ao invés dojsonify
do flask, porém eu havia esquecido que o jsonify adiciona automaticamente o mimetype comoapplication/json
e o schema não... daí pra resolver isso eu podia escolher entre, adicionar o mimetype na mão, instalar a extensão flask-marshmallow que já tem um jsonify embutido no dump, ou simplesmente usar o jsonify em tudo... Escolhi a terceira opção pois é a mais simples e não precisa adicionar nenhuma nova dependencia.Sugiro também que todos os outros endpoints usem como retorno o jsonify pra padronizarmos (Esse PR também resolve isso, afinal só temos dois endpoints msm kkkkkkkkk)