-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Primitives converted correctly:
* @psalm-type TalkBot = array{
* description: ?string,
* }"required": [
"description",
],
"properties": {
"description": {
"type": "string",
"nullable": true
},Bot: {
description: string | null;
}But the same doesn't happen to other psalm-types:
* @psalm-type TalkThreadInfo = array{
* first: ?TalkChatMessage,
* }"required": [
"first",
],
"properties": {
"first": {
"$ref": "#/components/schemas/ChatMessage",
"nullable": true
},Actual behaviour
ThreadInfo: {
first: components["schemas"]["ChatMessage"];
}Expected behaviour
ThreadInfo: {
first: components["schemas"]["ChatMessage"] | null;
}As i found out, they changed handling of nullables in 3.1.0, so after some playing around: this JSON output would work as expected:
"first": {
"oneOf": [
{ "$ref": "#/components/schemas/ChatMessage" },
{ "type": "null" }
]
},
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
☑️ Done