This commit is contained in:
2026-01-01 15:49:49 +01:00
parent 8c289622e1
commit 85567d87b7
8 changed files with 29 additions and 26 deletions

View File

@@ -19,16 +19,16 @@ import json
from typing import Optional
from pydantic import BaseModel, StrictStr
from pydantic import BaseModel, Field, StrictStr
class ClientDto(BaseModel):
"""
ClientDto
"""
name: Optional[StrictStr] = None
company_name: Optional[StrictStr] = Field(None, alias="companyName")
username: Optional[StrictStr] = None
key: Optional[StrictStr] = None
__properties = ["name", "username", "key"]
__properties = ["companyName", "username", "key"]
class Config:
"""Pydantic configuration"""
@@ -66,7 +66,7 @@ class ClientDto(BaseModel):
return ClientDto.parse_obj(obj)
_obj = ClientDto.parse_obj({
"name": obj.get("name"),
"company_name": obj.get("companyName"),
"username": obj.get("username"),
"key": obj.get("key")
})

View File

@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**company_name** | **str** | | [optional]
**username** | **str** | | [optional]
**key** | **str** | | [optional]

View File

@@ -36,7 +36,7 @@ class TestClientDto(unittest.TestCase):
model = ClientDto() # noqa: E501
if include_optional:
return ClientDto(
name = '',
company_name = '',
username = '',
key = ''
)

View File

@@ -44,7 +44,7 @@ components:
ClientDto:
type: "object"
properties:
name:
companyName:
type: "string"
nullable: true
username: