From 9fc17412e27c420e772580108ce9e4f8324658e4 Mon Sep 17 00:00:00 2001 From: KCLee Date: Tue, 15 Sep 2026 15:46:08 +0800 Subject: [PATCH 1/2] updated OpenAPI spec --- openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yml b/openapi.yml index 7287da0..be90a2c 100644 --- a/openapi.yml +++ b/openapi.yml @@ -342,7 +342,7 @@ components: error: too many requests too quickly message: "slow down" docs: https://sunrise-sunset.org/api#rate-limits -#The externalDocs object is for a single link of external documentation or reference that might be relevant to the API. Here is it used as attribution as required by the [API](https://sunrise-sunset.org/api) +#The externalDocs object is for a single link of external documentation or reference that might be relevant to the API. Here it is used as attribution as required by the [API](https://sunrise-sunset.org/api) externalDocs: description: https://sunrise-sunset.org/api url: https://sunrise-sunset.org/api From 912b6ffb9e6d5021fb0d482b8371899b7bf044b4 Mon Sep 17 00:00:00 2001 From: KCLee Date: Tue, 15 Sep 2026 15:54:28 +0800 Subject: [PATCH 2/2] fixed linting errors --- openapi.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openapi.yml b/openapi.yml index be90a2c..324014e 100644 --- a/openapi.yml +++ b/openapi.yml @@ -5,14 +5,19 @@ info: description: Our free API tells you when the sun rises and sets anywhere on Earth, plus **twilight**, **golden hour**, **solar position** and **moon data**. All you need is a **latitude** and **longitude**; you make a simple GET request and get the answer as JSON.

Time come in the local timezone of the place, and you can ask for a single day or up to a whole year in one request.

The API is **free to use**; no sign up or API key required. termsOfService: https://sunrise-sunset.org/ version: 'Version 2' + license: + name: MIT #The server object to include the URLs to the production server of the API. servers: - url: https://api.sunrise-sunset.org description: Version 2 +#The API is free to use and requires no API key or authentication. +security: [] #The `paths` object holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL to query the API. There is only one operation for this API. paths: /v2: get: + summary: Get sunrise, sunset, twilight, and moon data for a location description: Returns when the sun rises and sets anywhere on Earth, plus twilight, golden hour, solar position and moon data. operationId: getSunriseSunset parameters: @@ -345,5 +350,4 @@ components: #The externalDocs object is for a single link of external documentation or reference that might be relevant to the API. Here it is used as attribution as required by the [API](https://sunrise-sunset.org/api) externalDocs: description: https://sunrise-sunset.org/api - url: https://sunrise-sunset.org/api - + url: https://sunrise-sunset.org/api \ No newline at end of file