Re: Add versions.json endpoint with latest release information
| От | Magnus Hagander |
|---|---|
| Тема | Re: Add versions.json endpoint with latest release information |
| Дата | |
| Msg-id | CABUevEw2ayzvAjg=hJyjY2XNHxTwUer3=1KavL2-v+cXtwX5gg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Add versions.json endpoint with latest release information (Sehrope Sarkuni <sehrope@jackdb.com>) |
| Ответы |
Re: Add versions.json endpoint with latest release information
|
| Список | pgsql-www |
On Tue, May 4, 2021 at 11:49 PM Sehrope Sarkuni <sehrope@jackdb.com> wrote: > > Updated patch is attached with the renamed field. > > Rather than use annotate(...), it defines a separate function to convert the Version model into a dict for serialization.That way the numtree function can be used for the major version (i.e. for 10.0 => 10). I think it ends up beingcleaner anyway as all the fields in the resulting JSON are listed in one place. Thanks, that looks much better, I agree. > Thanks for updating the sample data. New output is now: Applied, with a few small changes: * Didn't pass the pep8 tests we run -- needed some adjustments to indentations and spacing only * Made version_to_json return the dict directly instead of building it incrementally. Probably faster, but the important part being I find that much more readable. * renamed eoldate -> eolDate and reldate -> relDate to follow the pattern Jonathan suggested wrt the latestMinor field Thanks! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
В списке pgsql-www по дате отправления: