forked from loafle/openapi-generator-original
Fix list examples in Python (for real) (#8034)
The patch in #7967 forgot the prefix, this fixes it, and change the sampels so that we can see the effect this time.
This commit is contained in:
@@ -1050,7 +1050,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
|
||||
} else if (ModelUtils.isArraySchema(schema)) {
|
||||
if (objExample instanceof Iterable) {
|
||||
// If the example is already a list, return it directly instead of wrongly wrap it in another list
|
||||
return objExample.toString();
|
||||
return fullPrefix + objExample.toString();
|
||||
}
|
||||
ArraySchema arrayschema = (ArraySchema) schema;
|
||||
Schema itemSchema = arrayschema.getItems();
|
||||
|
||||
@@ -133,6 +133,7 @@ paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example: ['tag1', 'tag2']
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
|
||||
@@ -477,9 +477,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = pet_api.PetApi(api_client)
|
||||
tags = [
|
||||
"tags_example",
|
||||
] # [str] | Tags to filter by
|
||||
tags = ["tag1","tag2"] # [str] | Tags to filter by
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user