fix: display of markdown in notes section (#20534)

* fix: display of markdown in notes section

* update samples

* skip blank lines

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Jonathan Martens 2025-02-19 10:15:29 +01:00 committed by GitHub
parent c2884b7b1a
commit 890c37fd77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 116 additions and 60 deletions

View File

@ -13,9 +13,9 @@ Method | HTTP request | Description
# **{{{operationId}}}**
> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
{{{summary}}}{{#notes}}
{{{summary}}}
{{{.}}}{{/notes}}
{{#unescapedNotes}}{{{.}}}{{/unescapedNotes}}
### Example

View File

@ -13,10 +13,14 @@ Method | HTTP request | Description
# **{{{operationId}}}**
> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
{{{summary}}}{{#notes}}
{{#summary}}
{{{summary}}}
{{{.}}}{{/notes}}
{{/summary}}
{{#unescapedNotes}}
{{{.}}}
{{/unescapedNotes}}
### Example
{{#hasAuthMethods}}

View File

@ -10,8 +10,6 @@ Method | HTTP request | Description
# **foo_get**
> FooGetDefaultResponse foo_get()
### Example

View File

@ -370,8 +370,6 @@ void (empty response body)
# **fake_outer_boolean_serialize**
> bool fake_outer_boolean_serialize(body=body)
Test serialization of outer boolean types
### Example
@ -436,8 +434,6 @@ No authorization required
# **fake_outer_composite_serialize**
> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
Test serialization of object with outer number type
### Example
@ -503,8 +499,6 @@ No authorization required
# **fake_outer_number_serialize**
> float fake_outer_number_serialize(body=body)
Test serialization of outer number types
### Example
@ -569,8 +563,6 @@ No authorization required
# **fake_outer_string_serialize**
> str fake_outer_string_serialize(body=body)
Test serialization of outer string types
### Example
@ -635,8 +627,6 @@ No authorization required
# **fake_property_enum_integer_serialize**
> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param)
Test serialization of enum (int) properties with examples
### Example
@ -1445,8 +1435,6 @@ No authorization required
# **test_body_with_binary**
> test_body_with_binary(body)
For this test, the body has to be a binary file.
### Example
@ -1509,8 +1497,6 @@ No authorization required
# **test_body_with_file_schema**
> test_body_with_file_schema(file_schema_test_class)
For this test, the body for this request must reference a schema named `File`.
### Example
@ -1574,8 +1560,6 @@ No authorization required
# **test_body_with_query_params**
> test_body_with_query_params(query, user)
### Example
@ -1641,7 +1625,7 @@ No authorization required
To test \"client\" model
To test \"client\" model
To test "client" model
### Example
@ -1707,8 +1691,6 @@ No authorization required
# **test_date_time_query_parameter**
> test_date_time_query_parameter(date_time_query, str_query)
### Example
@ -1835,7 +1817,11 @@ No authorization required
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
### Example
@ -2282,8 +2268,6 @@ No authorization required
# **test_object_for_multipart_requests**
> test_object_for_multipart_requests(marker)
### Example
@ -2345,8 +2329,6 @@ No authorization required
# **test_query_parameter_collection_format**
> test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, language=language)
To test the collection format in query parameters
### Example

View File

@ -12,6 +12,8 @@ Method | HTTP request | Description
### Example
```python

View File

@ -48,6 +48,8 @@ Method | HTTP request | Description
test any type request body
### Example
```python
@ -110,6 +112,8 @@ No authorization required
test enum reference query parameter
### Example
```python
@ -173,6 +177,8 @@ No authorization required
Health check endpoint
### Example
```python
@ -234,6 +240,8 @@ No authorization required
test http signature authentication
### Example
```python
@ -698,6 +706,8 @@ No authorization required
test ref to enum string
### Example
```python
@ -759,6 +769,8 @@ No authorization required
test returning boolean
### Example
```python
@ -819,6 +831,8 @@ No authorization required
test byte like json
### Example
```python
@ -879,6 +893,8 @@ No authorization required
test returning enum
### Example
```python
@ -939,6 +955,8 @@ No authorization required
test enum like json
### Example
```python
@ -999,6 +1017,8 @@ No authorization required
test returning float
### Example
```python
@ -1059,6 +1079,8 @@ No authorization required
test returning int
### Example
```python
@ -1119,6 +1141,8 @@ No authorization required
test returning list of objects
### Example
```python
@ -1180,6 +1204,8 @@ No authorization required
test str like json
### Example
```python
@ -1240,6 +1266,8 @@ No authorization required
test returning string
### Example
```python
@ -1300,6 +1328,8 @@ No authorization required
test uuid example
### Example
```python
@ -1553,6 +1583,8 @@ No authorization required
### Example
```python
@ -1617,7 +1649,7 @@ No authorization required
To test \"client\" model
To test \"client\" model
To test "client" model
### Example
@ -1684,6 +1716,8 @@ No authorization required
### Example
```python
@ -1808,7 +1842,11 @@ No authorization required
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
### Example
@ -1912,6 +1950,8 @@ void (empty response body)
test error responses with model
### Example
```python
@ -2251,6 +2291,8 @@ No authorization required
### Example
```python

View File

@ -12,6 +12,8 @@ Method | HTTP request | Description
test date time
### Example
```python

View File

@ -12,6 +12,8 @@ Method | HTTP request | Description
### Example
```python

View File

@ -48,6 +48,8 @@ Method | HTTP request | Description
test any type request body
### Example
```python
@ -110,6 +112,8 @@ No authorization required
test enum reference query parameter
### Example
```python
@ -173,6 +177,8 @@ No authorization required
Health check endpoint
### Example
```python
@ -234,6 +240,8 @@ No authorization required
test http signature authentication
### Example
```python
@ -698,6 +706,8 @@ No authorization required
test ref to enum string
### Example
```python
@ -759,6 +769,8 @@ No authorization required
test returning boolean
### Example
```python
@ -819,6 +831,8 @@ No authorization required
test byte like json
### Example
```python
@ -879,6 +893,8 @@ No authorization required
test returning enum
### Example
```python
@ -939,6 +955,8 @@ No authorization required
test enum like json
### Example
```python
@ -999,6 +1017,8 @@ No authorization required
test returning float
### Example
```python
@ -1059,6 +1079,8 @@ No authorization required
test returning int
### Example
```python
@ -1119,6 +1141,8 @@ No authorization required
test returning list of objects
### Example
```python
@ -1180,6 +1204,8 @@ No authorization required
test str like json
### Example
```python
@ -1240,6 +1266,8 @@ No authorization required
test returning string
### Example
```python
@ -1300,6 +1328,8 @@ No authorization required
test uuid example
### Example
```python
@ -1553,6 +1583,8 @@ No authorization required
### Example
```python
@ -1617,7 +1649,7 @@ No authorization required
To test \"client\" model
To test \"client\" model
To test "client" model
### Example
@ -1684,6 +1716,8 @@ No authorization required
### Example
```python
@ -1808,7 +1842,11 @@ No authorization required
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
### Example
@ -1912,6 +1950,8 @@ void (empty response body)
test error responses with model
### Example
```python
@ -2251,6 +2291,8 @@ No authorization required
### Example
```python

View File

@ -12,6 +12,8 @@ Method | HTTP request | Description
test date time
### Example
```python

View File

@ -10,8 +10,6 @@ Method | HTTP request | Description
# **foo_get**
> FooGetDefaultResponse foo_get()
### Example

View File

@ -370,8 +370,6 @@ void (empty response body)
# **fake_outer_boolean_serialize**
> bool fake_outer_boolean_serialize(body=body)
Test serialization of outer boolean types
### Example
@ -436,8 +434,6 @@ No authorization required
# **fake_outer_composite_serialize**
> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
Test serialization of object with outer number type
### Example
@ -503,8 +499,6 @@ No authorization required
# **fake_outer_number_serialize**
> float fake_outer_number_serialize(body=body)
Test serialization of outer number types
### Example
@ -569,8 +563,6 @@ No authorization required
# **fake_outer_string_serialize**
> str fake_outer_string_serialize(body=body)
Test serialization of outer string types
### Example
@ -635,8 +627,6 @@ No authorization required
# **fake_property_enum_integer_serialize**
> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param)
Test serialization of enum (int) properties with examples
### Example
@ -1445,8 +1435,6 @@ No authorization required
# **test_body_with_binary**
> test_body_with_binary(body)
For this test, the body has to be a binary file.
### Example
@ -1509,8 +1497,6 @@ No authorization required
# **test_body_with_file_schema**
> test_body_with_file_schema(file_schema_test_class)
For this test, the body for this request must reference a schema named `File`.
### Example
@ -1574,8 +1560,6 @@ No authorization required
# **test_body_with_query_params**
> test_body_with_query_params(query, user)
### Example
@ -1641,7 +1625,7 @@ No authorization required
To test \"client\" model
To test \"client\" model
To test "client" model
### Example
@ -1707,8 +1691,6 @@ No authorization required
# **test_date_time_query_parameter**
> test_date_time_query_parameter(date_time_query, str_query)
### Example
@ -1835,7 +1817,11 @@ No authorization required
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
### Example
@ -2282,8 +2268,6 @@ No authorization required
# **test_object_for_multipart_requests**
> test_object_for_multipart_requests(marker)
### Example
@ -2345,8 +2329,6 @@ No authorization required
# **test_query_parameter_collection_format**
> test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, language=language)
To test the collection format in query parameters
### Example