forked from loafle/openapi-generator-original
Support multiple api keys in python example documentation (#7417)
* Support multiple api keys in config option * Regenerate samples * Update rest of examples
This commit is contained in:
@@ -92,12 +92,8 @@ configuration = {{{packageName}}}.Configuration(
|
||||
{{#isApiKey}}
|
||||
|
||||
# Configure API key authorization: {{{name}}}
|
||||
configuration = {{{packageName}}}.Configuration(
|
||||
host = "{{{basePath}}}",
|
||||
api_key = {
|
||||
'{{name}}': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['{{{name}}}'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['{{name}}'] = 'Bearer'
|
||||
{{/isApiKey}}
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -335,12 +335,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -100,12 +100,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -368,12 +368,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -99,12 +99,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -335,12 +335,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -100,12 +100,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -335,12 +335,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -100,12 +100,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -62,22 +62,14 @@ configuration = x_auth_id_alias.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -38,22 +38,14 @@ configuration = x_auth_id_alias.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
@@ -122,22 +114,14 @@ configuration = x_auth_id_alias.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
@@ -205,12 +189,8 @@ configuration = x_auth_id_alias.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
@@ -278,12 +258,8 @@ configuration = x_auth_id_alias.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = x_auth_id_alias.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -545,12 +545,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -99,12 +99,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -35,12 +35,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key_query': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -333,12 +333,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
@@ -100,12 +100,8 @@ configuration = petstore_api.Configuration(
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2",
|
||||
api_key = {
|
||||
'api_key': 'YOUR_API_KEY'
|
||||
}
|
||||
)
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user