From 7155cb33bea143108699c081202fdb754a91cc62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 27 Sep 2023 06:37:54 +0200 Subject: Swagger UI stop using PHP, add comments about default url. --- manifests/swagger_ui.pp | 24 ++++++++++++++++++------ 1 file 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',], + # } + } -- cgit v1.2.3