Просмотр исходного кода

fix(openapi): update openapi server url (#75532)

Since we moved to regional apis, our server url is now `us.sentry.io`.

Someone can correct me if i'm wrong, but the europe server url is
`de.sentry.io`? In which case, we can add it as well.

For context, when you feed the api spec into a doc generator such as
swagger UI, the server url is used as a base url to all the endpoints.
Dominik Buszowiecki 7 месяцев назад
Родитель
Сommit
8e85a9dfb7
2 измененных файлов с 5 добавлено и 2 удалено
  1. 4 1
      api-docs/openapi.json
  2. 1 1
      src/sentry/conf/server.py

+ 4 - 1
api-docs/openapi.json

@@ -15,7 +15,10 @@
   },
   "servers": [
     {
-      "url": "https://sentry.io/"
+      "url": "https://us.sentry.io/"
+    },
+    {
+      "url": "https://de.sentry.io/"
     }
   ],
   "tags": [

+ 1 - 1
src/sentry/conf/server.py

@@ -1436,7 +1436,7 @@ if os.environ.get("OPENAPIGENERATE", False):
         "PARSER_WHITELIST": ["rest_framework.parsers.JSONParser"],
         "POSTPROCESSING_HOOKS": ["sentry.apidocs.hooks.custom_postprocessing_hook"],
         "PREPROCESSING_HOOKS": ["sentry.apidocs.hooks.custom_preprocessing_hook"],
-        "SERVERS": [{"url": "https://sentry.io"}],
+        "SERVERS": [{"url": "https://us.sentry.io"}, {"url": "https://de.sentry.io"}],
         "SORT_OPERATION_PARAMETERS": custom_parameter_sort,
         "TAGS": OPENAPI_TAGS,
         "TITLE": "API Reference",