You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which results in datamodel-code-generator 0.25.6 I'm getting models like this generated:
api_version: Optional[str] =Field(
None,
description='Indication of the API version implemented at this URL. Must be "v0.4.2" when implementing this version of the API.',
example='v0.4.2',
)
But Pydantic Field has no argument example. It has examples though.
This appears to be because this is an OpenAPI 3.0.2 file, and apparently in [OAI 3.1[(https://redocly.com/docs/openapi-visual-reference/schemas/#example-and-examples) example changes to examples.
components:
schemas:
StatusResponse:
type: object
required:
- status
properties:
api_version:
description: |-
Indication of the API version implemented at this URL. Must be "v0.4.2" when implementing this version of the API.
type: string
example: v0.4.2
```
The text was updated successfully, but these errors were encountered:
My project has
which results in
datamodel-code-generator 0.25.6
I'm getting models like this generated:But Pydantic
Field
has no argumentexample
. It hasexamples
though.Example file
This appears to be because this is an OpenAPI 3.0.2 file, and apparently in [OAI 3.1[(https://redocly.com/docs/openapi-visual-reference/schemas/#example-and-examples)
example
changes toexamples
.The text was updated successfully, but these errors were encountered: