Skip to content

Fix copy-paste "format: binary" error - #4294

Merged
ralfhandl merged 2 commits into
OAI:v3.1-devfrom
handrews:copy-paste
Jan 10, 2025
Merged

Fix copy-paste "format: binary" error#4294
ralfhandl merged 2 commits into
OAI:v3.1-devfrom
handrews:copy-paste

Conversation

@handrews

@handrewshandrews commented Jan 9, 2025

Copy link
Copy Markdown
Member

Fixes#4293

These examples got copied from 3.0.4 and apparently I forgot to adjust them for 3.1.1 and no one else noticed.

These examples got copied from 3.0.4 and apparently I forgot to
adjust them for 3.1.1 and no one else noticed.
@handrewshandrews added bug examples requests for more or better examples in the specification labels Jan 9, 2025
@handrewshandrews added this to the v3.1.2 milestone Jan 9, 2025
@handrews
handrews requested review from a team as code ownersJanuary 9, 2025 02:40
Comment threadsrc/oas.md Outdated
@ralfhandl

Copy link
Copy Markdown
Contributor

Lgtm

@ralfhandl
ralfhandl self-requested a review January 10, 2025 14:51

@mikekistlermikekistler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

I left some comments to add contentEncoding in places where I thought it added clarity. When I first read this line:

default for a string without contentEncoding is text/plain

my thought was "default what"? So my changes are intended to fix that but I'll defer to your judgement to decide if this is necessary.

Comment threadsrc/oas.md
schema:
type: object
properties:
# default for a string without `contentEncoding` is `text/plain`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead say:

Suggested change
# default for a string without `contentEncoding` is `text/plain`
# default `contentEncoding` for a string is `text/plain`

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikekistler no, because text/plain is a content type (Encoding Object contentType, or alternatively Schema Object contentMediaType) and not a content encoding (Schema Object contentEncoding, or alternatively Encoding Object headers field, header Content-TransferEncoding) which is something like "base64"

But we could say:

# default content type for a string without `contentEncoding` is `text/plain`

so I'll do that. I totally see how you read it the way you did and I had to think a moment before realizing what was wrong with it.

Comment threadsrc/oas.md
# default for a schema without `type` is `application/octet-stream`
profileImage: {}

# default for arrays is based on the type in the `items`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and

Suggested change
# default for arrays is based on the type in the `items`
# default `contentEncoding` for arrays is based on the type in the `items`

Comment threadsrc/oas.md
schema:
type: object
properties:
# No Encoding Object, so use default `text/plain`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and

Suggested change
# No Encoding Object, so use default `text/plain`
# No Encoding Object, so use default `contentEncoding` `text/plain`

Comment threadsrc/oas.md
type: string
format: uuid

# Encoding Object overrides the default `application/json`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and maybe

Suggested change
# Encoding Object overrides the default `application/json`
# Encoding Object overrides the default `contentEncoding` `application/json`

@ralfhandl
ralfhandl merged commit 9291879 into OAI:v3.1-devJan 10, 2025
@handrews
handrews deleted the copy-paste branch June 19, 2025 17:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugexamplesrequests for more or better examples in the specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discrepancy between encoding multipart/ examples and working with binary data sections

3 participants

@handrews@ralfhandl@mikekistler