Skip to content

Support base64 encoded data (type: string + format: byte) #11

Closed
@czechboy0

Description

@czechboy0

Currently, only type: string + format: binary is supported, and represents raw data (an octet stream).

OpenAPI also supports base64-encoded data, represented as the following JSON schema:

type: string
format: byte

The generated type for it should also be Foundation.Data (same as for format: binary), but as part of serialization/deserialization, the extra step of base64 coding needs to be added.

Testing: verify that both a whole request/response body being application/json with the contents of a base64-encoded string (use case 1), but also as a nested field in a JSON object (use case 2), both are pretty common.

Metadata

Metadata

Assignees

Labels

area/openapiAdding/updating a feature defined in OpenAPI.kind/featureNew feature.size/SSmall task. (A couple of hours of work.)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions