Open
Description
Description
It looks like I am having a couple issues.
$ref: '#/definitions/Tenant/properties/name'
gets rendered in theTenant
model with typeTenantpropertiesname
- The rendered
Tenant
model only has aname
property. TheTenant
definition below has 6 total properties which do not make it into the rendered model. - Replacing
$ref: '#/definitions/Tenant/properties/name'
with a simpletype: string
fixes the type issue but still leaves a relatively emptyTemplate
model.
@property
def name(self):
"""
Gets the name of this Tenant.
:return: The name of this Tenant.
:rtype: Tenantpropertiesname
"""
return self._name
Swagger-codegen version
2.2.3
Swagger declaration file content or url
patch:
description: Update a tenant record.
operationId: update
tags:
- tenants
parameters:
- $ref: "#/parameters/id"
- in: body
name: tenant
description: The tenant properties to update
schema:
type: object
required:
- name
properties:
name:
$ref: '#/definitions/Tenant/properties/name'
Tenant:
type: object
required:
- name
- handle
properties:
id:
type: integer
format: int32
readOnly: true
name:
type: string
handle:
type: string
pattern: '^[a-zA-Z0-9-]{0,62}$'
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
deletedAt:
type: string
format: date-time
readOnly: true
Command line used for generation
swagger-codegen generate --input-spec fetched/tenant-service.yaml --lang python --output sdk
Steps to reproduce
Related issues/PRs
I am not able to find a related issue.
Suggest a fix/enhancement
Unsure.