-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: nullable ref is not a valid OpenAPI definition #12103
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acid-chicken
added
🐛Bug
Unexpected behavior
packages/backend
Server side specific issue/PR
labels
Oct 21, 2023
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #12103 +/- ##
===========================================
- Coverage 79.36% 79.25% -0.11%
===========================================
Files 939 939
Lines 100332 100337 +5
Branches 8183 8157 -26
===========================================
- Hits 79625 79522 -103
- Misses 20707 20815 +108
☔ View full report in Codecov by Sentry. |
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -740,7 +740,11 @@
"nullable": true,
"optional": true,
"ref": "User",
- "$ref": "#/components/schemas/User"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/User"
+ }
+ ]
}
},
"required": [
@@ -57890,7 +57894,11 @@
"nullable": true,
"optional": false,
"ref": "Page",
- "$ref": "#/components/schemas/Page"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Page"
+ }
+ ]
},
"publicReactions": {
"type": "boolean",
@@ -58495,14 +58503,22 @@
"optional": true,
"nullable": true,
"ref": "Note",
- "$ref": "#/components/schemas/Note"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Note"
+ }
+ ]
},
"renote": {
"type": "object",
"optional": true,
"nullable": true,
"ref": "Note",
- "$ref": "#/components/schemas/Note"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Note"
+ }
+ ]
},
"isHidden": {
"type": "boolean",
@@ -58786,7 +58802,11 @@
"ref": "UserLite",
"optional": true,
"nullable": true,
- "$ref": "#/components/schemas/UserLite"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserLite"
+ }
+ ]
},
"userId": {
"type": "string",
@@ -58799,7 +58819,11 @@
"ref": "Note",
"optional": true,
"nullable": true,
- "$ref": "#/components/schemas/Note"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Note"
+ }
+ ]
},
"reaction": {
"type": "string",
@@ -58950,7 +58974,11 @@
"optional": true,
"nullable": true,
"ref": "DriveFolder",
- "$ref": "#/components/schemas/DriveFolder"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/DriveFolder"
+ }
+ ]
},
"userId": {
"type": "string",
@@ -58964,7 +58992,11 @@
"optional": true,
"nullable": true,
"ref": "UserLite",
- "$ref": "#/components/schemas/UserLite"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserLite"
+ }
+ ]
}
},
"required": [
@@ -59027,7 +59059,11 @@
"optional": true,
"nullable": true,
"ref": "DriveFolder",
- "$ref": "#/components/schemas/DriveFolder"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/DriveFolder"
+ }
+ ]
}
},
"required": [
@@ -59064,7 +59100,11 @@
"optional": true,
"nullable": false,
"ref": "UserDetailed",
- "$ref": "#/components/schemas/UserDetailed"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserDetailed"
+ }
+ ]
},
"followerId": {
"type": "string",
@@ -59077,7 +59117,11 @@
"optional": true,
"nullable": false,
"ref": "UserDetailed",
- "$ref": "#/components/schemas/UserDetailed"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserDetailed"
+ }
+ ]
}
},
"required": [
@@ -59288,14 +59332,22 @@
"optional": false,
"nullable": true,
"ref": "UserLite",
- "$ref": "#/components/schemas/UserLite"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserLite"
+ }
+ ]
},
"usedBy": {
"type": "object",
"optional": false,
"nullable": true,
"ref": "UserLite",
- "$ref": "#/components/schemas/UserLite"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UserLite"
+ }
+ ]
},
"usedAt": {
"type": "string", |
👍🏻 👍🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
nullable
やoptional
なオブジェクトで$ref
を使う場合はallOf
でラップするようにWhy
nullable
やoptional
キーワードと$ref
の併用は OpenAPI 3.0 の定義として invalid なのでAdditional info (optional)
Checklist