-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Swagger contains following:
Region:
description: |
everything you could want to know
type: object
allOf:
- $ref: "#/definitions/RegionSummary"
RegionSummary:
type: object
description: |
summary information
allOf:
- type: object
required:
- id
- realmName
- timeCreated
properties:
id:
description: Unique
type: string
realmName:
description: the name
type: string
minLength: 1
maxLength: 255 # ?
timeCreated:
description: When the region
type: string
format: date-time
Expected output is Region class should either inherit from RegionSummary or contain all the attributes of RegionSummary. However, swagger_to_py_client.py generates empty class:
class Region:
"""
Everything you could want
"""
def to_jsonable(self) -> MutableMapping[str, Any]:
"""
Dispatches the conversion to region_to_jsonable.
:return: a JSON-able representation
"""
return region_to_jsonable(self)
def new_region() -> Region:
"""Generates an instance of Region with default values."""
return Region()
Does swagger-to support allOf? If yes, how to make it generate correct stub?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels