From 1ec2b6b543207fc0fe29f088282fa807a12e0137 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 24 Mar 2025 17:49:13 +0000 Subject: [PATCH 1/2] Add OpenAPI definition file --- openapi.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 openapi.yml diff --git a/openapi.yml b/openapi.yml new file mode 100644 index 0000000000..bb7314d4f7 --- /dev/null +++ b/openapi.yml @@ -0,0 +1,92 @@ +openapi: 3.1.0 +info: + title: "PHP Website API" + description: "APIs available for use on the www.php.net website." + version: 2025.4.1 + +servers: + - url: "https://www.php.net" + description: "The php.net website." + +components: + pathItems: + releases: + get: + summary: "Atom feed of php.net news and announcements." + responses: + "200": + description: "Atom feed of php.net news and announcements." + content: + "application/atom+xml": + schema: + readOnly: true + externalDocs: + description: "Standard Atom feed with additional fields in the php: xml namespace." + url: http://php.net/ns/releases + +paths: + "/mirror-info.php": + get: + summary: >- + Returns information about the host running php.net. + Historically, this was unique per mirror. + With the move to a CDN model in 2019, there is now only one canonical source, and thus only one relevant configuration. + Refer to https://github.com/php/web-php/blob/master/mirror-info.php for the serialization format of the response. + responses: + "200": + description: "Successful response of host configuration. This API does not error." + content: + "text/plain": + schema: + type: string + readOnly: true + externalDocs: + description: "This pipe delimited string's contents are described in the source code for this file." + url: "https://github.com/php/web-php/blob/master/mirror-info.php" + example: "https://www.php.net/|8.4.5|1743832640|0|0|en|manual-noalias|1|Core,date,libxml,json,SPL,Zend OPcache|php-web4|169.254.12.255" + + "/releases/feed.php": + "$ref": "#/components/pathItems/releases" + + # Redirects to /releases/feed.php + "/relases.atom": + "$ref": "#/components/pathItems/releases" + + "/releases/branches.php": + get: + summary: "Currently active versions of PHP." + responses: + "200": + description: "Actively supported per-branch versions of PHP." + content: + "application/json": + schema: + type: object + properties: + branch: + description: "Major.Minor branch identifier, e.g. (8.4, 5.6, etc...)" + type: string + latest: + description: "Most recent release on this branch (e.g. 8.4.5, 5.6.40, etc...)" + type: string + state: + description: "Overall release readiness of the branch." + type: string + enum: + - stable + - security + - eol + - future + initial_release: + description: "Date on which first GA release of the branch was announced." + type: string + format: date-time + active_support_end: + description: "Date on which general bugfix support for this branch ends." + type: string + format: date-time + security_support_end: + description: "Date on which all support for this branch ends." + type: string + format: date-time + From 05da7965e82679cc7961e708372d0fd26552145b Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 24 Mar 2025 22:38:25 +0000 Subject: [PATCH 2/2] array not object --- openapi.yml | 58 +++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/openapi.yml b/openapi.yml index bb7314d4f7..5d2d6da9cd 100644 --- a/openapi.yml +++ b/openapi.yml @@ -61,32 +61,34 @@ paths: content: "application/json": schema: - type: object - properties: - branch: - description: "Major.Minor branch identifier, e.g. (8.4, 5.6, etc...)" - type: string - latest: - description: "Most recent release on this branch (e.g. 8.4.5, 5.6.40, etc...)" - type: string - state: - description: "Overall release readiness of the branch." - type: string - enum: - - stable - - security - - eol - - future - initial_release: - description: "Date on which first GA release of the branch was announced." - type: string - format: date-time - active_support_end: - description: "Date on which general bugfix support for this branch ends." - type: string - format: date-time - security_support_end: - description: "Date on which all support for this branch ends." - type: string - format: date-time + type: array + items: + type: object + properties: + branch: + description: "Major.Minor branch identifier, e.g. (8.4, 5.6, etc...)" + type: string + latest: + description: "Most recent release on this branch (e.g. 8.4.5, 5.6.40, etc...)" + type: string + state: + description: "Overall release readiness of the branch." + type: string + enum: + - stable + - security + - eol + - future + initial_release: + description: "Date on which first GA release of the branch was announced." + type: string + format: date-time + active_support_end: + description: "Date on which general bugfix support for this branch ends." + type: string + format: date-time + security_support_end: + description: "Date on which all support for this branch ends." + type: string + format: date-time