fix: update OpenAPI externalDocs URL

fixes https://github.com/PostgREST/postgrest/issues/3091
This commit is contained in:
Salim B
2024-07-13 17:11:06 +02:00
committed by Wolfgang Walther
parent db9da0b1ca
commit 13868983af
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- #3644, Show number of timezones in schema cache load report - @wolfgangwalther - #3644, Show number of timezones in schema cache load report - @wolfgangwalther
- #3644, List correct enum options in OpenApi output when multiple types with same name are present - @wolfgangwalther - #3644, List correct enum options in OpenApi output when multiple types with same name are present - @wolfgangwalther
- #3523, Fix schema cache loading retry without backoff - @steve-chavez - #3523, Fix schema cache loading retry without backoff - @steve-chavez
- #3091, Broken link in OpenAPI description `externalDocs` - @salim-b
## [12.2.1] - 2024-06-27 ## [12.2.1] - 2024-06-27
+1 -1
View File
@@ -402,7 +402,7 @@ postgrestSpec (prettyVersion, docsVersion) rels pds ti (s, h, p, b) sd allowSecu
& description ?~ fromMaybe "This is a dynamic API generated by PostgREST" dDesc) & description ?~ fromMaybe "This is a dynamic API generated by PostgREST" dDesc)
& externalDocs ?~ ((mempty :: ExternalDocs) & externalDocs ?~ ((mempty :: ExternalDocs)
& description ?~ "PostgREST Documentation" & description ?~ "PostgREST Documentation"
& url .~ URL ("https://postgrest.org/en/" <> docsVersion <> "/api.html")) & url .~ URL ("https://postgrest.org/en/" <> docsVersion <> "/references/api.html"))
& host .~ h' & host .~ h'
& definitions .~ fromList (makeTableDef rels <$> ti) & definitions .~ fromList (makeTableDef rels <$> ti)
& parameters .~ fromList (makeParamDefs ti) & parameters .~ fromList (makeParamDefs ti)
+1 -1
View File
@@ -45,7 +45,7 @@ spec actualPgVersion = describe "OpenAPI" $ do
let docsUrl = r ^? key "externalDocs" . key "url" let docsUrl = r ^? key "externalDocs" . key "url"
liftIO $ docsUrl `shouldBe` Just (String ("https://postgrest.org/en/" <> docsVersion <> "/api.html")) liftIO $ docsUrl `shouldBe` Just (String ("https://postgrest.org/en/" <> docsVersion <> "/references/api.html"))
describe "schema" $ do describe "schema" $ do