Closed tib closed 5 months ago
Yes, this is still possible to represent. For OAS 3.1, use contentType: .binary
instead of format: .binary
but otherwise the same (still a string schema).
Many thanks for the help, actually it is called contentEncoding
and the output is:
requestBody:
description: Upload request body
content:
application/pdf:
schema:
type: string
contentEncoding: binary
This is the Swift code I used to generate the yaml snippet:
OpenAPI.Request(
description: description,
content: [
contentType: .init(
schema: .string(
contentEncoding: .binary
)
)
],
required: true
)
Many thanks for the help, I'll close this issue now. 👍
Woops, I botched the description but you found the answer anyway. Thanks for the correction.
Hello,
based on the OpenAPI 3.1 migration guide, this is how users could describe binaries:
OpenAPI v3.0:
OpenAPI v3.1:
My question: is it possible te describe the
{}
somehow using the OpenAPIKit library? I had no luck so far, there is no.binary
JSONSchema / content. I'm not sure how to overcome this issue. Is this feature even supported, or am I missing something? 🤔Many thanks. 🙏 Tib