From e737c533b57ccebdf167b74017568c291c8b3b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Va=C5=A1ko?= Date: Tue, 7 Jan 2025 11:20:01 +0100 Subject: [PATCH] fix: Change URL of apps proxy component url in swagger --- api/appsproxy/design.go | 2 +- internal/pkg/service/appsproxy/api/openapi/openapi.json | 2 +- internal/pkg/service/appsproxy/api/openapi/openapi.yaml | 2 +- internal/pkg/service/appsproxy/api/openapi/openapi3.json | 2 +- internal/pkg/service/appsproxy/api/openapi/openapi3.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/appsproxy/design.go b/api/appsproxy/design.go index 3cd1b8ae78..25b338fb35 100644 --- a/api/appsproxy/design.go +++ b/api/appsproxy/design.go @@ -52,7 +52,7 @@ var _ = API("appsproxy", func() { }) Server("appsproxy", func() { Host("production", func() { - URI("https://appsproxy.{stack}") + URI("https://hub.{stack}") Variable("stack", String, "Base URL of the stack", func() { Default("keboola.com") Enum("keboola.com", "eu-central-1.keboola.com", "north-europe.azure.keboola.com", "eu-west-1.aws.keboola.dev", "east-us-2.azure.keboola-testing.com") diff --git a/internal/pkg/service/appsproxy/api/openapi/openapi.json b/internal/pkg/service/appsproxy/api/openapi/openapi.json index 014af2126e..abea7d1f77 100644 --- a/internal/pkg/service/appsproxy/api/openapi/openapi.json +++ b/internal/pkg/service/appsproxy/api/openapi/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Data application proxy","description":"A service for proxing requests/authorization to data applications using Keboola components.","version":"1.0"},"host":"appsproxy.keboola.com","consumes":["application/json"],"produces":["application/json"],"paths":{"/_proxy/api/":{"get":{"tags":["appsproxy"],"summary":"Redirect to /_proxy","description":"Redirect to /_proxy.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/_proxy/api/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ServiceDetail","required":["api","documentation"]}}},"schemes":["https"]}},"/_proxy/api/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/validate":{"get":{"tags":["appsproxy"],"summary":"Validation of OIDC authorization provider configuration","description":"Validation endpoint of OIDC authorization provider configuration.","operationId":"Validate","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Validations"}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"Configuration":{"title":"Configuration","type":"object","properties":{"clientID":{"type":"string","description":"Client ID of provider.","example":"github.oidc"},"clientSecret":{"type":"string","description":"Client secret provided by OIDC provider.","example":"thisissupersecret"},"id":{"type":"string","description":"Unique ID of provider.","example":"oidc#1"}},"description":"The configuration that is part of the auth providers section.","example":{"clientID":"github.oidc","clientSecret":"thisissupersecret","id":"oidc#1"},"required":["id","clientID","clientSecret"]},"ServiceDetail":{"title":"ServiceDetail","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"appsproxy"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://appsproxy.keboola.com/v1/documentation"}},"example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"},"required":["api","documentation"]},"Validations":{"title":"Validations","type":"object","properties":{"configuration":{"type":"array","items":{"$ref":"#/definitions/Configuration"},"description":"All authorization providers.","example":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}},"example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}},"securityDefinitions":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Data application proxy","description":"A service for proxing requests/authorization to data applications using Keboola components.","version":"1.0"},"host":"hub.keboola.com","consumes":["application/json"],"produces":["application/json"],"paths":{"/_proxy/api/":{"get":{"tags":["appsproxy"],"summary":"Redirect to /_proxy","description":"Redirect to /_proxy.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/_proxy/api/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ServiceDetail","required":["api","documentation"]}}},"schemes":["https"]}},"/_proxy/api/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/_proxy/api/v1/validate":{"get":{"tags":["appsproxy"],"summary":"Validation of OIDC authorization provider configuration","description":"Validation endpoint of OIDC authorization provider configuration.","operationId":"Validate","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Validations"}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"Configuration":{"title":"Configuration","type":"object","properties":{"clientID":{"type":"string","description":"Client ID of provider.","example":"github.oidc"},"clientSecret":{"type":"string","description":"Client secret provided by OIDC provider.","example":"thisissupersecret"},"id":{"type":"string","description":"Unique ID of provider.","example":"oidc#1"}},"description":"The configuration that is part of the auth providers section.","example":{"clientID":"github.oidc","clientSecret":"thisissupersecret","id":"oidc#1"},"required":["id","clientID","clientSecret"]},"ServiceDetail":{"title":"ServiceDetail","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"appsproxy"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://appsproxy.keboola.com/v1/documentation"}},"example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"},"required":["api","documentation"]},"Validations":{"title":"Validations","type":"object","properties":{"configuration":{"type":"array","items":{"$ref":"#/definitions/Configuration"},"description":"All authorization providers.","example":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}},"example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}},"securityDefinitions":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}} \ No newline at end of file diff --git a/internal/pkg/service/appsproxy/api/openapi/openapi.yaml b/internal/pkg/service/appsproxy/api/openapi/openapi.yaml index d4c6fb77d2..ea25a82bc7 100644 --- a/internal/pkg/service/appsproxy/api/openapi/openapi.yaml +++ b/internal/pkg/service/appsproxy/api/openapi/openapi.yaml @@ -3,7 +3,7 @@ info: title: Data application proxy description: A service for proxing requests/authorization to data applications using Keboola components. version: "1.0" -host: appsproxy.keboola.com +host: hub.keboola.com consumes: - application/json produces: diff --git a/internal/pkg/service/appsproxy/api/openapi/openapi3.json b/internal/pkg/service/appsproxy/api/openapi/openapi3.json index 318acded71..35cf9c1962 100644 --- a/internal/pkg/service/appsproxy/api/openapi/openapi3.json +++ b/internal/pkg/service/appsproxy/api/openapi/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Data application proxy","description":"A service for proxing requests/authorization to data applications using Keboola components.","version":"1.0"},"servers":[{"url":"https://appsproxy.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com","eu-west-1.aws.keboola.dev","east-us-2.azure.keboola-testing.com"],"default":"keboola.com"}}},{"url":"http://localhost:8000"}],"paths":{"/_proxy/api/":{"get":{"tags":["appsproxy"],"summary":"Redirect to /_proxy","description":"Redirect to /_proxy.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}}}},"/_proxy/api/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"},"example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"}}}}}}},"/_proxy/api/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/validate":{"get":{"tags":["appsproxy"],"summary":"Validation of OIDC authorization provider configuration","description":"Validation endpoint of OIDC authorization provider configuration.","operationId":"Validate","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Validations"},"example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"Configuration":{"type":"object","properties":{"clientID":{"type":"string","description":"Client ID of provider.","example":"github.oidc"},"clientSecret":{"type":"string","description":"Client secret provided by OIDC provider.","example":"thisissupersecret"},"id":{"type":"string","description":"Unique ID of provider.","example":"oidc#1"}},"description":"The configuration that is part of the auth providers section.","example":{"clientID":"github.oidc","clientSecret":"thisissupersecret","id":"oidc#1"},"required":["id","clientID","clientSecret"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Generic error","example":{"error":"templates.internalError","message":"Internal Error","statusCode":500},"required":["statusCode","error","message"]},"ProxyRequest":{"type":"object","properties":{"path":{"type":"string","description":"\"Path that proxies to data application\".","example":""}},"example":{"path":""}},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"appsproxy"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://appsproxy.keboola.com/v1/documentation"}},"description":"Information about the service","example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"},"required":["api","documentation"]},"Validations":{"type":"object","properties":{"configuration":{"type":"array","items":{"$ref":"#/components/schemas/Configuration"},"description":"All authorization providers.","example":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}},"description":"List of configurations of OIDC providers.","example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"apps-proxy","description":"Service for proxing requests/authorization to data applications using Keboola data app component."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Data application proxy","description":"A service for proxing requests/authorization to data applications using Keboola components.","version":"1.0"},"servers":[{"url":"https://hub.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com","eu-west-1.aws.keboola.dev","east-us-2.azure.keboola-testing.com"],"default":"keboola.com"}}},{"url":"http://localhost:8000"}],"paths":{"/_proxy/api/":{"get":{"tags":["appsproxy"],"summary":"Redirect to /_proxy","description":"Redirect to /_proxy.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}}}},"/_proxy/api/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"},"example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"}}}}}}},"/_proxy/api/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded"}}}},"/_proxy/api/v1/validate":{"get":{"tags":["appsproxy"],"summary":"Validation of OIDC authorization provider configuration","description":"Validation endpoint of OIDC authorization provider configuration.","operationId":"Validate","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Validations"},"example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"Configuration":{"type":"object","properties":{"clientID":{"type":"string","description":"Client ID of provider.","example":"github.oidc"},"clientSecret":{"type":"string","description":"Client secret provided by OIDC provider.","example":"thisissupersecret"},"id":{"type":"string","description":"Unique ID of provider.","example":"oidc#1"}},"description":"The configuration that is part of the auth providers section.","example":{"clientID":"github.oidc","clientSecret":"thisissupersecret","id":"oidc#1"},"required":["id","clientID","clientSecret"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Generic error","example":{"error":"templates.internalError","message":"Internal Error","statusCode":500},"required":["statusCode","error","message"]},"ProxyRequest":{"type":"object","properties":{"path":{"type":"string","description":"\"Path that proxies to data application\".","example":""}},"example":{"path":""}},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"appsproxy"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://appsproxy.keboola.com/v1/documentation"}},"description":"Information about the service","example":{"api":"appsproxy","documentation":"https://appsproxy.keboola.com/v1/documentation"},"required":["api","documentation"]},"Validations":{"type":"object","properties":{"configuration":{"type":"array","items":{"$ref":"#/components/schemas/Configuration"},"description":"All authorization providers.","example":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}},"description":"List of configurations of OIDC providers.","example":{"configuration":[{"statusCode":404,"error":"validations incorrect","message":"unable to validate due to missing entry","id":"test","name":"My Template"}]}}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"apps-proxy","description":"Service for proxing requests/authorization to data applications using Keboola data app component."}]} \ No newline at end of file diff --git a/internal/pkg/service/appsproxy/api/openapi/openapi3.yaml b/internal/pkg/service/appsproxy/api/openapi/openapi3.yaml index 5235658826..b7dc155407 100644 --- a/internal/pkg/service/appsproxy/api/openapi/openapi3.yaml +++ b/internal/pkg/service/appsproxy/api/openapi/openapi3.yaml @@ -4,7 +4,7 @@ info: description: A service for proxing requests/authorization to data applications using Keboola components. version: "1.0" servers: - - url: https://appsproxy.{stack} + - url: https://hub.{stack} variables: stack: enum: