summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-27 06:37:54 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-27 06:37:54 +0200
commit7155cb33bea143108699c081202fdb754a91cc62 (patch)
tree617798e093a04424e59fd1710a822b96f81b0a2c
parentMinor cleanup. (diff)
downloadprofiles-7155cb33bea143108699c081202fdb754a91cc62.tar.gz
profiles-7155cb33bea143108699c081202fdb754a91cc62.tar.xz
Swagger UI stop using PHP, add comments about default url.
-rw-r--r--manifests/swagger_ui.pp24
1 files changed, 18 insertions, 6 deletions
diff --git a/manifests/swagger_ui.pp b/manifests/swagger_ui.pp
index 9c6140f..e885282 100644
--- a/manifests/swagger_ui.pp
+++ b/manifests/swagger_ui.pp
@@ -39,10 +39,22 @@ class profiles::swagger_ui (
* => letsencrypt::conf::nginx($server_name),
}
- php_fpm::nginx { 'swagger-ui':
- server => $server_name,
- conf => {
- www_root => $www_root,
- },
- }
+ # TODO enable the setting of default url.
+ # This is idemponent, but with the following caveats:
+ # - it will always run, causing an update
+ # - it will be overwritten by a system update (probably)
+ # (but then soon after auto fixed by puppet).
+ #
+ # $src = 'url: *"\([^"]\|\"\)*"'
+ # $default_uri = 'https://adrift.space/code/todo-3.0/openapi.yaml'
+ # .replace('/', '\/')
+
+ # exec { 'swagger-ui set default uri':
+ # command => [
+ # 'sed',
+ # "s/${src}/url: \"${default_uri}\"/",
+ # "${www_root}/swagger-initializer.js"],
+ # path => ['/bin', '/usr/bin',],
+ # }
+
}