Clear and concise description of the problem
The following TypeSpec definition
model Foo {
@encode("base64", string)
b64_json?: bytes;
}
Leads to the follow OpenAPI 3.1/3.2 descriptions
openapi: 3.2.0
info:
title: (title)
version: 0.0.0
tags: []
paths: {}
components:
schemas:
Foo:
type: object
properties:
b64_json:
type: string
contentEncoding: base64
And the following OpenAPI 3.0 description
openapi: 3.0.0
info:
title: (title)
version: 0.0.0
tags: []
paths: {}
components:
schemas:
Foo:
type: object
properties:
b64_json:
type: string
format: base64
But importing those to TypeSpec leads to the following result in 3.1/3.2
model Foo {
b64_json?: string;
}
And this result in 3.0
model Foo {
@format("base64") b64_json?: string;
}
The import result looks correct for OpenAPI 3.0 due to the lack of support for contentEncoding. However the import in 3.1/3.2 should lead to a bytes type and an encode decorator.
Checklist
Clear and concise description of the problem
The following TypeSpec definition
Leads to the follow OpenAPI 3.1/3.2 descriptions
And the following OpenAPI 3.0 description
But importing those to TypeSpec leads to the following result in 3.1/3.2
And this result in 3.0
The import result looks correct for OpenAPI 3.0 due to the lack of support for contentEncoding. However the import in 3.1/3.2 should lead to a bytes type and an encode decorator.
Checklist