Skip to content

feat(spec): codify Encoding in specific requestBody mediatypes #3834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ee5c9ba
operationId in the link object is a string
karenetheridge Jul 2, 2022
427bba1
Make PathItem operation properties specific.
karenetheridge Sep 11, 2022
927f706
v3.1 license schema modified to describe url and identifier as mutual…
arno-di-loreto Oct 6, 2022
d19d96d
Publish v3.1 schemas version 2022-10-07 (#3042)
jdesrosiers Oct 13, 2022
09e36a0
Update to create next agenda on Thursday (#3065)
darrelmiller Nov 17, 2022
d70993b
Enforce documented /pets pagination size limit (#3070)
TheTeaCat Nov 17, 2022
e91800b
docs(IMPLEMENTATIONS): add openapi-runtime-expression to the list (#3…
char0n Nov 17, 2022
8ef0c83
Add Bump.sh to user Interfaces list (#3071)
ChristopheDujarric Nov 17, 2022
1353289
Update IMPLEMENTATIONS.md (#3055)
octavianN Nov 17, 2022
630d2b4
Remove maxLength for operationObject/summary in the v1.2 spec (#3018)
HoldYourWaffle Nov 17, 2022
0cfab72
Update JSON example files (#3077)
github-actions[bot] Nov 17, 2022
d6902a1
Update README.md
freddy1020 Jul 21, 2022
a7618b1
fix(docs): update Encoding Object example
jeremyfiel Feb 24, 2023
44efc00
Merge branch 'main' of https://github.com/jeremyfiel/OpenAPI-Specific…
jeremyfiel Feb 24, 2023
b8c49d0
Create 3.0.4.md
Mar 1, 2023
4b2d494
format:base64 doesn't exist -> format:byte (#3182)
ralfhandl Mar 4, 2023
ff8626f
fix: typo in style example (#3180)
handrews Mar 4, 2023
f367790
Fix for #2167 (#3189)
ralfhandl Mar 6, 2023
e9814c9
Fix broken RFC links (#3188)
handrews Mar 6, 2023
1afa325
fix(docs): update invalid schema property in Encoding Object example …
jeremyfiel Mar 6, 2023
0345166
3.0.4: fix Link Object example (#3194)
ralfhandl Mar 9, 2023
41103df
Clarify the use of "binary" and "byte" formats (#3187)
handrews Mar 11, 2023
1ef950b
Update servers description on Path Item Object (#3259)
charjr May 11, 2023
971282a
Settle on "OpenAPI Description" (3.0.4) (#3384)
handrews Sep 28, 2023
3d9a39a
punctuation fix (#3397)
karenetheridge Oct 19, 2023
e574293
Copy Versions section from 3.1.1-dev (#3214)
ralfhandl Feb 15, 2024
c6680d7
Sync validate-markdown workflow with main (3.0.4) (#3558)
jeremyfiel May 21, 2024
89d15aa
whitespace and quoting fixes in json and yaml examples
karenetheridge Dec 6, 2023
c743c21
Fix incorrect OpenIDConnect discovery url
shilpa-padgaonkar Feb 24, 2024
3148914
changed ref and url -Update 3.0.4.md
shilpa-padgaonkar Mar 4, 2024
bf6d358
Improve password field data description (original PR 3413)
lornajane Apr 7, 2024
5cf0822
Backport improved OpenAPI specification intro paragraph from 3.1.1 (o…
lornajane Apr 7, 2024
f7f087f
Update Spec for Style Values
charjr Mar 28, 2024
d5f1965
path.id is not a url
Bellangelo Apr 15, 2024
c49f952
Apply improved wording around status codes from 3.1.1 (original PR #2…
lornajane Apr 18, 2024
5cceb89
fix style=form examples
karenetheridge Apr 25, 2024
b684ee4
Explain default Encoding Object behavior
handrews Apr 19, 2024
aad0baa
Improved wording from review feedback.
handrews Apr 23, 2024
0e9fcb0
Correctly escape example operationRef URLs
handrews Apr 20, 2024
ac40067
Non-string discriminator values have undefined behavior
handrews Apr 20, 2024
9368229
Fix typo (review feedback)
handrews Apr 22, 2024
2893b1f
Clarify wording on encoding field
jeremyfiel May 21, 2024
805493a
Wording improvement from review feedback.
handrews Apr 23, 2024
db47ff9
Make wording consistent (review feedback)
handrews Apr 24, 2024
6ac1cc0
Clarify spaceDelimited with spaces in values
handrews Apr 19, 2024
a2bee4e
Clarify how to model streaming binary data
handrews Apr 20, 2024
87cd6d4
Explain how maxLength applies to raw binary
handrews Apr 25, 2024
da1b586
Include streaming string data, other wording improvements.
handrews Apr 26, 2024
0316410
switch the order of these styles in the tables
jeremyfiel May 21, 2024
9c6918b
Sync .gitignore from main
jeremyfiel May 21, 2024
60b0ee9
Clarify constraints on Parameter Object fields
handrews Apr 26, 2024
a032d83
Backport a clarification about deepObject to 3.0.4
lornajane May 1, 2024
6bfb04a
Define "undefined" and "implementation-defined" (3.0.4)
handrews May 3, 2024
6056ed9
Review feedback from notEthan and ralfhandl
handrews May 8, 2024
bdcb96b
Backport case insensitivity note for security schemes from #2644 into…
lornajane May 1, 2024
802b588
Link for case insensitivity of auth scheme
ralfhandl May 14, 2024
82d424b
Fix "it" -> "its" typo
handrews May 14, 2024
4e55039
Clarify allowEmptyValue -> disregard empty values
handrews May 16, 2024
ab56432
feat(spec): codify Encoding in specific requestBody mediatypes
jeremyfiel May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/validate-markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2 # checkout repo content
- uses: actions/setup-node@v1 # setup Node.js
- uses: actions/checkout@v4 # checkout repo content
with:
node-version: '14.x'
fetch-depth: 0
- name: use the javascript environment from main
run: |
git checkout remotes/origin/main -- package.json package-lock.json
- uses: actions/setup-node@v4 # setup Node.js
with:
node-version: '20.x'
- name: Validate markdown
run: npx mdv versions/3.*.md

run: npx --yes mdv versions/3.*.md
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
target
atlassian-ide-plugin.xml
node_modules/
package-lock.json
deploy/
history
Gemfile.lock
23 changes: 23 additions & 0 deletions schemas/v3.0/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,26 @@ definitions:
additionalProperties: false

MediaType:
type: object
properties:
schema:
oneOf:
- $ref: '#/definitions/Schema'
- $ref: '#/definitions/Reference'
example: {}
examples:
type: object
additionalProperties:
oneOf:
- $ref: '#/definitions/Example'
- $ref: '#/definitions/Reference'
patternProperties:
'^x-': {}
additionalProperties: false
allOf:
- $ref: '#/definitions/ExampleXORExamples'

MediaTypeWithEncoding:
type: object
properties:
schema:
Expand Down Expand Up @@ -758,6 +778,9 @@ definitions:
type: object
additionalProperties:
$ref: '#/definitions/MediaType'
patternProperties:
"^application/x-www-form-urlencoded$|^multipart\/.+$":
$ref: "#/definitions/MediaTypeWithEncoding"
required:
type: boolean
default: false
Expand Down
14 changes: 14 additions & 0 deletions schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,24 @@ $defs:
type: object
additionalProperties:
$ref: '#/$defs/media-type'
patternProperties:
'^application/x-www-form-urlencoded$|^multipart\/.+$':
$ref: '#/$defs/media-type-with-encoding'
propertyNames:
format: media-range

media-type:
$comment: https://spec.openapis.org/oas/v3.1.0#media-type-object
type: object
properties:
schema:
$dynamicRef: '#meta'
allOf:
- $ref: '#/$defs/specification-extensions'
- $ref: '#/$defs/examples'
unevaluatedProperties: false

media-type-with-encoding:
$comment: https://spec.openapis.org/oas/v3.1.0#media-type-object
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion versions/3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ requestBody:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'
$ref: '#/components/schemas/Address'
```

An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ requestBody:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'
$ref: '#/components/schemas/Address'
```

An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.0.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ requestBody:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'
$ref: '#/components/schemas/Address'
```

An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies.
Expand Down
2 changes: 1 addition & 1 deletion versions/3.0.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ requestBody:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'
$ref: '#/components/schemas/Address'
```

An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies.
Expand Down
Loading