From 8bd4dbb1e2384b907d6a59aa129069fa9d05c923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Mate=CC=8Cjka?= Date: Tue, 1 Mar 2022 14:10:50 +0100 Subject: [PATCH] Fix summary of links to apaidocs specs --- api/templates/design.go | 16 ++++++++++++---- api/templates/gen/openapi.json | 2 +- api/templates/gen/openapi.yaml | 8 ++++---- api/templates/gen/openapi3.json | 2 +- api/templates/gen/openapi3.yaml | 8 ++++---- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/api/templates/design.go b/api/templates/design.go index 88b8b96b92..3f9a1a3c10 100644 --- a/api/templates/design.go +++ b/api/templates/design.go @@ -65,8 +65,16 @@ var _ = Service("templates", func() { }) }) - Files("/documentation/openapi.json", "gen/openapi.json") - Files("/documentation/openapi.yaml", "gen/openapi.yaml") - Files("/documentation/openapi3.json", "gen/openapi3.json") - Files("/documentation/openapi3.yaml", "gen/openapi3.yaml") + Files("/documentation/openapi.json", "gen/openapi.json", func() { + Meta("swagger:summary", "Swagger 2.0 JSON Definition") + }) + Files("/documentation/openapi.yaml", "gen/openapi.yaml", func() { + Meta("swagger:summary", "Swagger 2.0 YAML Definition") + }) + Files("/documentation/openapi3.json", "gen/openapi3.json", func() { + Meta("swagger:summary", "OpenAPI 3.0 JSON Definition") + }) + Files("/documentation/openapi3.yaml", "gen/openapi3.yaml", func() { + Meta("swagger:summary", "OpenAPI 3.0 YAML Definition") + }) }) diff --git a/api/templates/gen/openapi.json b/api/templates/gen/openapi.json index c25eb74a58..86e3a4787b 100644 --- a/api/templates/gen/openapi.json +++ b/api/templates/gen/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects","version":"1.0"},"host":"templates.keboola.com","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["templates"],"summary":"index-root templates","operationId":"templates#index-root","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/v1":{"get":{"tags":["templates"],"summary":"index templates","operationId":"templates#index","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TemplatesIndexResponseBody"}}},"schemes":["https"]}},"/v1/documentation/openapi.json":{"get":{"tags":["templates"],"summary":"Download gen/openapi.json","operationId":"templates#/v1/documentation/openapi.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi.yaml":{"get":{"tags":["templates"],"summary":"Download gen/openapi.yaml","operationId":"templates#/v1/documentation/openapi.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi3.json":{"get":{"tags":["templates"],"summary":"Download gen/openapi3.json","operationId":"templates#/v1/documentation/openapi3.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["templates"],"summary":"Download gen/openapi3.yaml","operationId":"templates#/v1/documentation/openapi3.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/health-check":{"get":{"tags":["templates"],"summary":"health-check templates","operationId":"templates#health-check","responses":{"200":{"description":"OK response."}},"schemes":["https"]}}},"definitions":{"TemplatesIndexResponseBody":{"title":"Mediatype identifier: application/vnd.templates.index; view=default","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"Url of the API documentation","example":"https://templates.keboola.com/v1/documentation"}},"description":"IndexResponseBody result type (default view)","example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects","version":"1.0"},"host":"templates.keboola.com","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["templates"],"summary":"index-root templates","operationId":"templates#index-root","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/v1":{"get":{"tags":["templates"],"summary":"index templates","operationId":"templates#index","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TemplatesIndexResponseBody"}}},"schemes":["https"]}},"/v1/documentation/openapi.json":{"get":{"tags":["templates"],"summary":"Swagger 2.0 JSON Definition","operationId":"templates#/v1/documentation/openapi.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi.yaml":{"get":{"tags":["templates"],"summary":"Swagger 2.0 YAML Definition","operationId":"templates#/v1/documentation/openapi.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi3.json":{"get":{"tags":["templates"],"summary":"OpenAPI 3.0 JSON Definition","operationId":"templates#/v1/documentation/openapi3.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["templates"],"summary":"OpenAPI 3.0 YAML Definition","operationId":"templates#/v1/documentation/openapi3.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["https"]}},"/v1/health-check":{"get":{"tags":["templates"],"summary":"health-check templates","operationId":"templates#health-check","responses":{"200":{"description":"OK response."}},"schemes":["https"]}}},"definitions":{"TemplatesIndexResponseBody":{"title":"Mediatype identifier: application/vnd.templates.index; view=default","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"Url of the API documentation","example":"https://templates.keboola.com/v1/documentation"}},"description":"IndexResponseBody result type (default view)","example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]}}} \ No newline at end of file diff --git a/api/templates/gen/openapi.yaml b/api/templates/gen/openapi.yaml index a8017b8fe3..af387b204a 100644 --- a/api/templates/gen/openapi.yaml +++ b/api/templates/gen/openapi.yaml @@ -41,7 +41,7 @@ paths: get: tags: - templates - summary: Download gen/openapi.json + summary: Swagger 2.0 JSON Definition operationId: templates#/v1/documentation/openapi.json responses: "200": @@ -54,7 +54,7 @@ paths: get: tags: - templates - summary: Download gen/openapi.yaml + summary: Swagger 2.0 YAML Definition operationId: templates#/v1/documentation/openapi.yaml responses: "200": @@ -67,7 +67,7 @@ paths: get: tags: - templates - summary: Download gen/openapi3.json + summary: OpenAPI 3.0 JSON Definition operationId: templates#/v1/documentation/openapi3.json responses: "200": @@ -80,7 +80,7 @@ paths: get: tags: - templates - summary: Download gen/openapi3.yaml + summary: OpenAPI 3.0 YAML Definition operationId: templates#/v1/documentation/openapi3.yaml responses: "200": diff --git a/api/templates/gen/openapi3.json b/api/templates/gen/openapi3.json index 695fe9300e..a984653bd1 100644 --- a/api/templates/gen/openapi3.json +++ b/api/templates/gen/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects","version":"1.0"},"servers":[{"url":"https://templates.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com"],"default":"keboola.com"}}}],"paths":{"/":{"get":{"tags":["templates"],"summary":"index-root templates","operationId":"templates#index-root","responses":{"301":{"description":"Moved Permanently response."}}}},"/v1":{"get":{"tags":["templates"],"summary":"index templates","operationId":"templates#index","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"}}}}}}},"/v1/documentation/openapi.json":{"get":{"tags":["templates"],"summary":"Download gen/openapi.json","operationId":"templates#/v1/documentation/openapi.json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi.yaml":{"get":{"tags":["templates"],"summary":"Download gen/openapi.yaml","operationId":"templates#/v1/documentation/openapi.yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.json":{"get":{"tags":["templates"],"summary":"Download gen/openapi3.json","operationId":"templates#/v1/documentation/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["templates"],"summary":"Download gen/openapi3.yaml","operationId":"templates#/v1/documentation/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/health-check":{"get":{"tags":["templates"],"summary":"health-check templates","operationId":"templates#health-check","responses":{"200":{"description":"OK response."}}}}},"components":{"schemas":{"Index":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"Url of the API documentation","example":"https://templates.keboola.com/v1/documentation"}},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]}}},"tags":[{"name":"templates","description":"Service for applying templates to Keboola projects"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects","version":"1.0"},"servers":[{"url":"https://templates.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com"],"default":"keboola.com"}}}],"paths":{"/":{"get":{"tags":["templates"],"summary":"index-root templates","operationId":"templates#index-root","responses":{"301":{"description":"Moved Permanently response."}}}},"/v1":{"get":{"tags":["templates"],"summary":"index templates","operationId":"templates#index","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"}}}}}}},"/v1/documentation/openapi.json":{"get":{"tags":["templates"],"summary":"Swagger 2.0 JSON Definition","operationId":"templates#/v1/documentation/openapi.json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi.yaml":{"get":{"tags":["templates"],"summary":"Swagger 2.0 YAML Definition","operationId":"templates#/v1/documentation/openapi.yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.json":{"get":{"tags":["templates"],"summary":"OpenAPI 3.0 JSON Definition","operationId":"templates#/v1/documentation/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["templates"],"summary":"OpenAPI 3.0 YAML Definition","operationId":"templates#/v1/documentation/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/health-check":{"get":{"tags":["templates"],"summary":"health-check templates","operationId":"templates#health-check","responses":{"200":{"description":"OK response."}}}}},"components":{"schemas":{"Index":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"Url of the API documentation","example":"https://templates.keboola.com/v1/documentation"}},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]}}},"tags":[{"name":"templates","description":"Service for applying templates to Keboola projects"}]} \ No newline at end of file diff --git a/api/templates/gen/openapi3.yaml b/api/templates/gen/openapi3.yaml index 4c9883186f..e404b98c8d 100644 --- a/api/templates/gen/openapi3.yaml +++ b/api/templates/gen/openapi3.yaml @@ -42,7 +42,7 @@ paths: get: tags: - templates - summary: Download gen/openapi.json + summary: Swagger 2.0 JSON Definition operationId: templates#/v1/documentation/openapi.json responses: "200": @@ -51,7 +51,7 @@ paths: get: tags: - templates - summary: Download gen/openapi.yaml + summary: Swagger 2.0 YAML Definition operationId: templates#/v1/documentation/openapi.yaml responses: "200": @@ -60,7 +60,7 @@ paths: get: tags: - templates - summary: Download gen/openapi3.json + summary: OpenAPI 3.0 JSON Definition operationId: templates#/v1/documentation/openapi3.json responses: "200": @@ -69,7 +69,7 @@ paths: get: tags: - templates - summary: Download gen/openapi3.yaml + summary: OpenAPI 3.0 YAML Definition operationId: templates#/v1/documentation/openapi3.yaml responses: "200":