-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Labels
bugSomething isn't workingSomething isn't workingemitter:openapi3Issues for @typespec/openapi3 emitterIssues for @typespec/openapi3 emittertriaged:core
Milestone
Description
Describe the bug
If a @doc decorator is used on a bytes field, the resulting OpenAPI spec does not include a description for that field.
model UploadParameters {
@doc("A `.zip` archive file.")
file: bytes,
}
components:
schemas:
UploadParametersMultiPart:
type: object
required:
- file
properties:
file:
type: string
format: binary
If file is changed to string, then a description appears as expected:
model UploadParameters {
@doc("A `.zip` archive file.")
file: string,
}
components:
schemas:
UploadParametersMultiPart:
type: object
required:
- file
properties:
file:
type: string
description: A `.zip` archive file.
Other types like int16, duration, and unknown also work as expected.
Reproduction
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
seiya8bit
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingemitter:openapi3Issues for @typespec/openapi3 emitterIssues for @typespec/openapi3 emittertriaged:core