endpoints
json
get_analysis_as_json
endpoint
This is a bad thing to do in my opinion. I don't like the ideia of iterate on the results list, just to get the last analyzed package version. I prefer to do this kind of stuff on the frontend and keep the api the most simple as possible.
The same problem here, iterates on results is not the best solution. Would be better if we add a generator_version and a generator_name field on the Analysis model for example.
2 new commits added
rebased onto 4814f9dde7b96155ba10864893ba80936d7b075a
3 new commits added
/package
I believe that its not necessary to add generator_version and generator_name on Analysis model because we can get this attributes from the Analyzer and Analysis relation, using Analysis attribute analyzer_id. If we save this ones on Analysis model, we are going to duplicate some Analyzer attributes on database.
generator_version
generator_name
analyzer_id
I have solved this using eagerload from sqlalchemy for inner joins and it works fine.
eagerload
sqlalchemy
inner joins
Pull-Request has been closed by davidcarlos
MERGED
Overview
endpointsnow return an specific and little result asjson;endpointsto ensure that they return only what it needs;endpointsand fixget_analysis_as_jsontest according the new result from itsendpoint.