nextcloud / nextcloud/openapi-extractor
Fields with numeric consts default value are incorrectly marked as required
Open
Nobody has claimed this yet.
bug
- Dominant language
- PHP
- Stars
- 11
- Forks
- 4
- Avg merge
- 10h 18m
- Merged PRs (30d)
- 8
Description
Controller
public function createRoomV2(
string $name,
int $type = Room::TYPE_GROUP,
int $readOnly = Room::READ_WRITE,
int $listable = Room::LISTABLE_NONE,
int $messageExpiration = 0,
int $lobbyState = Webinary::LOBBY_NONE,
?int $lobbyTimer = null,
int $sipEnabled = Webinary::SIP_DISABLED,
int $permissions = Attendee::PERMISSIONS_DEFAULT,
int $recordingConsent = RecordingService::CONSENT_REQUIRED_NO,
int $mentionPermissions = Room::MENTION_PERMISSIONS_EVERYONE,
string $description = '',
?string $password = null,
?string $objectType = null,
?string $objectId = null,
?string $emoji = null,
?string $avatarColor = null,
array $participants = [],
): DataResponse {
Expectation
Only name is marked as required
Actual
Also fields with consts as default are marked as required
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the extractor interprets the createRoomV2 controller parameters and determines whether each parameter is required. Verify the handling of numeric constant defaults against literal defaults, and consider the work done when only name remains required for the shown signature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100