Skip to content

Commit

Permalink
[Python] cleanup documentation (#15301)
Browse files Browse the repository at this point in the history
* [Python] fix documentation of API authorization in README files

fix hierarchy level + add internal links + align wording across generators

* [Python] fix anchor links in documentation
  • Loading branch information
tiffmaelite committed May 9, 2023
1 parent da9ad4a commit c251202
Show file tree
Hide file tree
Showing 55 changed files with 944 additions and 908 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Class | Method | HTTP request | Description
{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}

<a id="documentation-for-authorization"></a>
## Documentation For Authorization

{{^authMethods}}
All endpoints do not require authorization.
{{/authMethods}}
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
{{#authMethods}}
{{#last}} Authentication schemes defined for the API:{{/last}}
## {{{name}}}
<a id="{{name}}"></a>
### {{{name}}}

{{#isApiKey}}
- **Type**: API key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ Class | Method | HTTP request | Description
{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}

<a id="documentation-for-authorization"></a>
## Documentation For Authorization

{{^authMethods}}
All endpoints do not require authorization.
{{/authMethods}}
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
{{#authMethods}}
{{#last}} Authentication schemes defined for the API:{{/last}}
## {{{name}}}
<a id="{{name}}"></a>
### {{{name}}}

{{#isApiKey}}
- **Type**: API key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ Class | Method | HTTP request | Description
{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}

<a id="documentation-for-authorization"></a>
## Documentation For Authorization

{{^authMethods}}
All endpoints do not require authorization.
{{/authMethods}}
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
{{#authMethods}}
{{#last}} Authentication schemes defined for the API:{{/last}}
## {{{name}}}
<a id="{{name}}"></a>
### {{{name}}}

{{#isApiKey}}
- **Type**: API key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
{{#unless authMethods}}
All endpoints do not require authorization.
Endpoints do not require authorization.
{{/unless}}
{{#if hasAuthMethods}}Authentication schemes defined for the API:{{/if}}
{{#each authMethods}}
{{#if @last}} Authentication schemes defined for the API:{{/if}}
## {{{name}}}
<a id="{{name}}"></a>
### {{{name}}}
{{#if isApiKey}}
- **Type**: API key
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a name="__pageTop"></a>
<a id="__pageTop"></a>
# {{packageName}}.{{apiPackage}}.tags.{{classFilename}}.{{classname}}{{#if description}}
{{description}}{{/if}}

Expand All @@ -12,7 +12,7 @@ Method | HTTP request | Description
{{#with operations}}
{{#each operation}}
# **{{{operationId}}}**
<a name="{{{operationId}}}"></a>
<a id="{{{operationId}}}"></a>
> {{#if returnType}}{{{returnType}}} {{/if}}{{{operationId}}}({{#each requiredParams}}{{#unless defaultValue}}{{paramName}}{{#if hasMore}}, {{/if}}{{/unless}}{{/each}})
{{#if summary}}{{{summary}}}{{/if}}{{#if notes}}
Expand Down
4 changes: 3 additions & 1 deletion samples/client/echo_api/python-nextgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ Class | Method | HTTP request | Description
- [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

All endpoints do not require authorization.
Endpoints do not require authorization.


## Author

Expand Down
17 changes: 10 additions & 7 deletions samples/client/petstore/python-asyncio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ Class | Method | HTTP request | Description
- [XmlItem](docs/XmlItem.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -184,22 +187,22 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header


## api_key_query
<a id="api_key_query"></a>
### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string


## http_basic_test
<a id="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

Expand Down
17 changes: 10 additions & 7 deletions samples/client/petstore/python-legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ Class | Method | HTTP request | Description
- [XmlItem](docs/XmlItem.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -184,22 +187,22 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header


## api_key_query
<a id="api_key_query"></a>
### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string


## http_basic_test
<a id="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

Expand Down
17 changes: 10 additions & 7 deletions samples/client/petstore/python-prior/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,13 @@ Class | Method | HTTP request | Description
- [XmlItem](docs/XmlItem.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -208,22 +211,22 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header


## api_key_query
<a id="api_key_query"></a>
### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string


## http_basic_test
<a id="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,13 @@ Class | Method | HTTP request | Description
- [XmlItem](docs/XmlItem.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -208,22 +211,22 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header


## api_key_query
<a id="api_key_query"></a>
### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string


## http_basic_test
<a id="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

Expand Down
17 changes: 10 additions & 7 deletions samples/client/petstore/python-tornado/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ Class | Method | HTTP request | Description
- [XmlItem](docs/XmlItem.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -184,22 +187,22 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header


## api_key_query
<a id="api_key_query"></a>
### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string


## http_basic_test
<a id="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

Expand Down
3 changes: 2 additions & 1 deletion samples/openapi3/client/3_0_3_unit_test/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,8 @@ Class | Method | HTTP request | Description

## Documentation For Authorization

All endpoints do not require authorization.
Endpoints do not require authorization.


## Author

Expand Down
Loading

0 comments on commit c251202

Please sign in to comment.