Describe the bug.
asyncapi generate models python backend/docs/asyncapi.yml --pyDantic -o backend/src/generated/models --packageName=src.generated.models
produces invalid files like:
class AnonymousSchema1(BaseModel):
id: str = Field()
source: str = Field(default=''xxx'', frozen=True)
I also don't see why some files/classes are created with a reasonable name and others are AnonymousSchemaN. Adding a title or name doesn't seem to make the difference.
Expected behavior
The value of default param should be a proper string - so " or ''' enclosed.
Screenshots
How to Reproduce
The source for this should be:
channels:
A:
# ...
messages:
M:
description: xyz
contentType: application/json
payload:
allOf:
- allOf: # ...
- description: xyz
type: object
properties:
type:
type: string
# this here
const: xxx
source:
type: string
# this as well
const: xxx
subject:
type: string
const: xyz
required:
- type
- source
- subject
🖥️ Device Information [optional]
- Operating System (OS): macOS
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it
Describe the bug.
asyncapi generate models python backend/docs/asyncapi.yml --pyDantic -o backend/src/generated/models --packageName=src.generated.modelsproduces invalid files like:
I also don't see why some files/classes are created with a reasonable name and others are
AnonymousSchemaN. Adding atitleornamedoesn't seem to make the difference.Expected behavior
The value of
defaultparam should be a proper string - so"or'''enclosed.Screenshots
How to Reproduce
The source for this should be:
🖥️ Device Information [optional]
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it