Export to python flask
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023
09:40 AM
02-22-2023
09:40 AM
Export to python flask
If I use:
demo_package:
allOf:
- type: object
properties:
unique_id:
type: string
name:
type: string
- type: object
properties:
asset_allocation:
description: Asset Allocations
type: array
items:
$ref: '#/components/schemas/asset_allocation_entry'
and Export python-flask I get (partial class):
class DemoPackage(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, asset_allocation: List[AssetAllocationEntry]=None):
However, with:
demo_package:
allOf:
- type: object
properties:
asset_allocation:
description: Asset Allocations
type: array
items:
$ref: '#/components/schemas/asset_allocation_entry'
- type: object
properties:
unique_id:
type: string
name:
type: string
I get (again, partial):
class DemoPackage(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, unique_id: str=None, name: str=None): # noqa: E501
I can't seem to get allOf. Please advise.
0 REPLIES 0
