-
Notifications
You must be signed in to change notification settings - Fork 344
Labels
openapi3:converterIssues for @typespec/openapi3 openapi to typespec converterIssues for @typespec/openapi3 openapi to typespec converter
Milestone
Description
When importing this OpenAPI schema
components:
schemas:
FineTuningJob:
type: object
properties:
created_at:
type: integer
description: The Unix timestamp (in seconds) for when the fine-tuning job was created.
format: unixtimeI get the following result
@encode(DateTimeKnownEncoding.unixTimestamp, integer) created_at: utcDateTimeHowever, if the schema is instead an anyOf with null, I get the following TypeSpec result, which misses the encode decorator
components:
schemas:
FineTuningJob:
type: object
properties:
finished_at:
anyOf:
- type: integer
description: The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
format: unixtime
- type: "null"finished_at: utcDateTime | nullThe decorator should be present whenever a union type with null is emitted.
Reactions are currently unavailable
Metadata
Metadata
Labels
openapi3:converterIssues for @typespec/openapi3 openapi to typespec converterIssues for @typespec/openapi3 openapi to typespec converter