-
Notifications
You must be signed in to change notification settings - Fork 4
Open
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.
Steps to reproduce
- Define arguments as optional
- Set default value as externally defined constant and not primitive (string, int)
- Run composer to generate JSON
Expected behaviour
Idea from @nickvergessen : if parser can not resolve the variable, it still should exclude the argument from the list of required args
Actual behaviour
See example in Talk: RoomController#createRoom
int $readOnly = Room::READ_WRITE,
int $listable = Room::LISTABLE_NONE,
int $messageExpiration = 0,All of them accept integers, but only messageExpiration is given a 0 default
"schema": {
"type": "object",
"required": [
"roomType",
"readOnly",
"listable",
"lobbyState",
"sipEnabled",
"permissions",
"recordingConsent",
"mentionPermissions"
],readOnly and listable are required, messageExpiration is not
"readOnly": {
"type": "integer",
"format": "int64",
"enum": [
0,
1
],
"description": "Read only..."
},
"listable": {
"type": "integer",
"format": "int64",
"enum": [
0,
1,
2
],
"description": "Scope where ..."
},
"messageExpiration": {
"type": "integer",
"format": "int64",
"default": 0,
"description": "Seconds after ...",
"minimum": 0
},only messageExpiration have default value
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working