Re: Add versions.json endpoint with latest release information

From: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Add versions.json endpoint with latest release information
Date: 2021-05-04 21:48:48
Message-ID: CAH7T-aofk31G=UjbKSpZY47c6ZAD6-D+nDoSAoi2qeYxJpSyXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

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 being cleaner anyway as all the fields in the resulting JSON are
listed in one place.

Thanks for updating the sample data. New output is now:

curl -s http://localhost:8000/versions.json | jq .

[
{
"current": false,
"eoldate": "2003-03-01",
"latestMinor": "2",
"major": "6.3",
"reldate": "1998-02-23",
"supported": false
},
{
"current": false,
"eoldate": "2003-10-30",
"latestMinor": "2",
"major": "6.4",
"reldate": "1999-01-03",
"supported": false
},
// ... truncated ...
{
"current": true,
"eoldate": "2025-11-13",
"latestMinor": "2",
"major": "13",
"reldate": "2021-02-11",
"supported": true
}
]

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Attachment Content-Type Size
0001-Add-versions.json-endpoint.v3.patch text/x-patch 2.3 KB

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message M.Arslan Kabeer 2021-05-05 20:51:55 Re: Any Update on Reported Vulnerability
Previous Message Jonathan S. Katz 2021-05-04 13:54:10 Re: Add versions.json endpoint with latest release information