Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature][python] Support aliasing of API keys #6469

Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2b80b8a
[python] Support aliasing of API keys
jirikuncar May 28, 2020
1b4250c
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 2, 2020
93a7223
Support for aliasing and prefix
jirikuncar Jun 2, 2020
7ae3dc6
Make more realistic usage
jirikuncar Jun 2, 2020
5b8f65f
Regenerate
jirikuncar Jun 2, 2020
0637df2
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 3, 2020
116fa25
Document alias in generated code
jirikuncar Jun 3, 2020
eb6557e
Support override of aliased keys
jirikuncar Jun 3, 2020
49a4c3d
Use diferent id and name for api keys
jirikuncar Jun 3, 2020
185650a
ensure up-to-date
jirikuncar Jun 3, 2020
c5710b7
Simple example without x-auth-id-alias
jirikuncar Jun 3, 2020
899e1f4
regenerate docs
jirikuncar Jun 3, 2020
12e4f9d
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 4, 2020
b2d82c1
Regenerate
jirikuncar Jun 4, 2020
ea2706d
Provide separate spec for x-auth-id-alias
jirikuncar Jun 4, 2020
e8cdc89
Apply suggestions from code review
jirikuncar Jun 4, 2020
3d5f7b7
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 5, 2020
e770aad
regenerated
jirikuncar Jun 5, 2020
5527702
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 5, 2020
2502a2c
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 8, 2020
a7a9183
Merge remote-tracking branch 'upstream/master' into jirikuncar/python…
jirikuncar Jun 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,16 @@ conf = {{{packageName}}}.Configuration(
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)

def get_api_key_with_prefix(self, identifier):
def get_api_key_with_prefix(self, identifier, alias=None):
"""Gets API key (with prefix if set).

:param identifier: The identifier of apiKey.
:param alias: The alternative identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier)
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
Expand Down Expand Up @@ -462,12 +463,15 @@ conf = {{{packageName}}}.Configuration(
auth = {}
{{#authMethods}}
{{#isApiKey}}
if '{{keyParamName}}' in self.api_key:
if '{{name}}' in self.api_key{{#vendorExtensions.x-auth-id-alias}} or '{{.}}' in self.api_key{{/vendorExtensions.x-auth-id-alias}}:
auth['{{name}}'] = {
'type': 'api_key',
'in': {{#isKeyInCookie}}'cookie'{{/isKeyInCookie}}{{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}},
'key': '{{keyParamName}}',
'value': self.get_api_key_with_prefix('{{keyParamName}}')
'value': self.get_api_key_with_prefix(
'{{name}}',{{#vendorExtensions.x-auth-id-alias}}
alias='{{.}}',{{/vendorExtensions.x-auth-id-alias}}
spacether marked this conversation as resolved.
Show resolved Hide resolved
),
}
{{/isApiKey}}
{{#isBasic}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ configuration = {{{packageName}}}.Configuration(
configuration = {{{packageName}}}.Configuration(
host = "{{{basePath}}}",
api_key = {
'{{{keyParamName}}}': 'YOUR_API_KEY'
'{{name}}': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['{{{keyParamName}}}'] = 'Bearer'
# configuration.api_key_prefix['{{name}}'] = 'Bearer'
{{/isApiKey}}
{{#isOAuth}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ paths:
summary: To test "client" model
description: To test "client" model
operationId: testClientModel
security:
- api_key_query: []
api_key: []
jirikuncar marked this conversation as resolved.
Show resolved Hide resolved
responses:
'200':
description: successful operation
Expand Down Expand Up @@ -1159,11 +1162,13 @@ components:
'read:pets': read your pets
api_key:
type: apiKey
name: api_key
name: X-Api-Key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may not be obvious but some generators samples have "live" tests which run pre-written tests against compiled code (see jersey2-java8). The tests aren't overwritten on generation (as a rule within DefaultGenerator).

This is documented in the description at the top of the file:

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.

If you update this api key, it would require changing those other "live tests".

In this case, I'd recommend creating a separate smaller spec or adding another auth type outside of api_key which allows you to test the aliasing. That way you wouldn't have the conflict in the test.

Copy link
Contributor

@spacether spacether Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jim does this point apply to this cordoned off spec file which is used for python-experimental only?
Is there another tag where we could ad this security scheme on to an use it there?
Should we use a new api tag?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spacether I don't know why a spec for python-only would be used by Java. My comment above is about changing a spec which is shared elsewhere and would require changes to hand-written Java tests.

I don't really follow your other questions. My recommendation was to add to the spec to avoid breaking those Java tests, or to create a standalone spec which demonstrates the aliasing behavior. If it was me, I'd do a separate minimal spec which demonstrates the behavior in unit tests then add the new alias parts to any existing spec to verify samples generation.

An issue with modifying existing specs that target swagger petstore (as does the one modified here) is that swagger petstore defines the header as api_key and someone wouldn't be able to use this spec to generate a valid client against that live API any longer. If we instead have another spec which doesn't target a real system's design (search for pony, fruits, and minimal "ping" specs), we don't risk breaking existing examples.

Eventually, I think we need to better organize and document the test specs so we know each are "fakes", which are intended to be exemplar full APIs, and which ones are only meant to evaluate full feature support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a separate spec to test API key aliasing feature and generate new Python client with tests for it.

Copy link
Contributor

@spacether spacether Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml spec is used in 2 locations to generate samples:

  • bin/openapi3/java-petstore-jersey2-java8.sh
  • bin/openapi3/python-experimental-petstore.sh

So I agree with Jim's assessment that we need a separate spec for python-experimental for this case because I do not see a PR adding support for api key aliasing in java-jersey2.
If this spec were only used by python-experimental then we could just:

  • add new security schemes
  • use them in a non-live server api like the fake tag api

How about this fix?

  • saving off the existing modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml as a resource that java-petstore-jersey2-java8.sh uses, maybe in a java-jersey2-java8 folder
  • adding your new changes to the existing python-experimental test file in the fake api, add new security schemes so they are only used in that one endpoint on the fake api

That fix meets these needs:

  • it keeps feature isolation between these 2 generators
  • it has no impact on live server testing based on specs because the fake api is not live
  • it keeps is clear which sample that our users should look at when they look for python-experimental samples for the v3.0 openapi sample

Copy link
Contributor

@spacether spacether Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimschubert does this proposed fix meet your needs or do you still prefer the small feature only spec?

in: header
api_key_query:
type: apiKey
name: api_key_query
name: api_key
# Test key aliasing
x-auth-id-alias: api_key
in: query
http_basic_test:
type: http
Expand Down Expand Up @@ -1443,7 +1448,7 @@ components:
maximum: 543.2
minimum: 32.1
type: number
multipleOf: 32.5
multipleOf: 32.5
float:
type: number
format: float
Expand Down Expand Up @@ -1969,7 +1974,7 @@ components:
# Here the additional properties are specified using a referenced schema.
# This is just to validate the generated code works when using $ref
# under 'additionalProperties'.
$ref: '#/components/schemas/fruit'
$ref: '#/components/schemas/fruit'
Shape:
oneOf:
- $ref: '#/components/schemas/Triangle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional]
**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional]
**any string name** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Name | Type | Description | Notes
**map_integer** | **{str: (int,)}** | | [optional]
**map_boolean** | **{str: (bool,)}** | | [optional]
**map_array_integer** | **{str: ([int],)}** | | [optional]
**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional]
**map_array_anytype** | **{str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}** | | [optional]
**map_map_string** | **{str: ({str: (str,)},)}** | | [optional]
**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional]
**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
**map_map_anytype** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | | [optional]
**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
**anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional]
**any string name** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-experimental/docs/Cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
**class_name** | **str** | |
**declawed** | **bool** | | [optional]
**color** | **str** | | [optional] if omitted the server will use the default value of 'red'
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-experimental/docs/Child.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
**radio_waves** | **bool** | | [optional]
**tele_vision** | **bool** | | [optional]
**inter_net** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**name** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**bark** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**loves_rocks** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-experimental/docs/Dog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
**class_name** | **str** | |
**breed** | **str** | | [optional]
**color** | **str** | | [optional] if omitted the server will use the default value of 'red'
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-experimental/docs/Parent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**radio_waves** | **bool** | | [optional]
**tele_vision** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,15 +345,16 @@ def logger_format(self, value):
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)

def get_api_key_with_prefix(self, identifier):
def get_api_key_with_prefix(self, identifier, alias=None):
"""Gets API key (with prefix if set).

:param identifier: The identifier of apiKey.
:param alias: The alternative identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier)
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
Expand Down Expand Up @@ -387,14 +388,18 @@ def auth_settings(self):
'type': 'api_key',
'in': 'header',
'key': 'api_key',
'value': self.get_api_key_with_prefix('api_key')
'value': self.get_api_key_with_prefix(
'api_key',
),
}
if 'api_key_query' in self.api_key:
auth['api_key_query'] = {
'type': 'api_key',
'in': 'query',
'key': 'api_key_query',
'value': self.get_api_key_with_prefix('api_key_query')
'value': self.get_api_key_with_prefix(
'api_key_query',
),
}
if self.username is not None and self.password is not None:
auth['http_basic_test'] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AdditionalPropertiesAnyType(ModelNormal):
validations = {
}

additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501
additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AdditionalPropertiesArray(ModelNormal):
validations = {
}

additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501
additional_properties_type = ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def openapi_types():
'map_integer': ({str: (int,)},), # noqa: E501
'map_boolean': ({str: (bool,)},), # noqa: E501
'map_array_integer': ({str: ([int],)},), # noqa: E501
'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501
'map_array_anytype': ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)},), # noqa: E501
'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501
'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501
'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
'map_map_anytype': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501
'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
}

@cached_property
Expand Down Expand Up @@ -162,12 +162,12 @@ def __init__(self, *args, **kwargs): # noqa: E501
map_integer ({str: (int,)}): [optional] # noqa: E501
map_boolean ({str: (bool,)}): [optional] # noqa: E501
map_array_integer ({str: ([int],)}): [optional] # noqa: E501
map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501
map_array_anytype ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}): [optional] # noqa: E501
map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501
map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501
anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
map_map_anytype ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): [optional] # noqa: E501
anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AdditionalPropertiesObject(ModelNormal):
validations = {
}

additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501
additional_properties_type = ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Cat(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Child(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ChildCat(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ChildDog(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ChildLizard(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Dog(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Parent(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ParentPet(ModelComposed):
validations = {
}

additional_properties_type = None
additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ README.md
docs/AdditionalPropertiesClass.md
docs/Address.md
docs/Animal.md
docs/AnimalFarm.md
docs/AnotherFakeApi.md
docs/ApiResponse.md
docs/Apple.md
Expand Down Expand Up @@ -109,6 +110,7 @@ petstore_api/model/__init__.py
petstore_api/model/additional_properties_class.py
petstore_api/model/address.py
petstore_api/model/animal.py
petstore_api/model/animal_farm.py
petstore_api/model/api_response.py
petstore_api/model/apple.py
petstore_api/model/apple_req.py
Expand Down
Loading