From 76fd2a2f666895c0934be8a473e1dc48e3ee8cd1 Mon Sep 17 00:00:00 2001 From: Tiffany Marrel Date: Tue, 9 May 2023 08:30:28 +0200 Subject: [PATCH] [Scala] cleanup documentation (#15304) * [Scala] fix documentation of API authorization in README files fix hierarchy level + add internal links + align wording across generators * [Scala] fix anchor links in documentation --- .../src/main/resources/scala-akka-client/README.mustache | 9 ++++++--- .../src/main/resources/scala-httpclient/README.mustache | 9 ++++++--- .../src/main/resources/scala-sttp/README.mustache | 9 ++++++--- samples/client/petstore/scala-akka/README.md | 4 ++++ samples/client/petstore/scala-sttp/README.md | 3 +++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache index 6ce43458d06..959c6c49e17 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache @@ -136,11 +136,14 @@ Class | Method | HTTP request | Description {{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) {{/model}}{{/models}} + ## Documentation for Authorization -{{^authMethods}}All endpoints do not require authorization. -{{/authMethods}}Authentication schemes defined for the API: -{{#authMethods}}### {{name}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} {{#isApiKey}}- **Type**: API key - **API key parameter name**: {{keyParamName}} diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache index a78cd7e3894..fefeafc1988 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache @@ -81,11 +81,14 @@ Class | Method | HTTP request | Description {{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) {{/model}}{{/models}} + ## Documentation for Authorization -{{^authMethods}}All endpoints do not require authorization. -{{/authMethods}}Authentication schemes defined for the API: -{{#authMethods}}### {{name}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} {{#isApiKey}}- **Type**: API key - **API key parameter name**: {{keyParamName}} diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache index 485b707dfd3..087418b0c3a 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache @@ -79,11 +79,14 @@ Class | Method | HTTP request | Description {{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) {{/model}}{{/models}} + ## Documentation for Authorization -{{^authMethods}}All endpoints do not require authorization. -{{/authMethods}}Authentication schemes defined for the API: -{{#authMethods}}### {{name}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} {{#isApiKey}}- **Type**: API key - **API key parameter name**: {{keyParamName}} diff --git a/samples/client/petstore/scala-akka/README.md b/samples/client/petstore/scala-akka/README.md index d3e110f822c..d7297a0ab1c 100644 --- a/samples/client/petstore/scala-akka/README.md +++ b/samples/client/petstore/scala-akka/README.md @@ -144,15 +144,19 @@ Class | Method | HTTP request | Description - [User](docs/User.md) + ## Documentation for Authorization + Authentication schemes defined for the API: + ### api_key - **Type**: API key - **API key parameter name**: api_key - **Location**: HTTP header + ### auth_cookie - **Type**: API key diff --git a/samples/client/petstore/scala-sttp/README.md b/samples/client/petstore/scala-sttp/README.md index ea6aa409dcf..457e38335d3 100644 --- a/samples/client/petstore/scala-sttp/README.md +++ b/samples/client/petstore/scala-sttp/README.md @@ -98,9 +98,12 @@ Class | Method | HTTP request | Description - [User](User.md) + ## Documentation for Authorization + Authentication schemes defined for the API: + ### api_key - **Type**: API key