Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

The OpenAPI spec incorrectly documented both GET and POST operations under /settings_global.json, but the actual implementation uses different paths.

Changes

  • Split /settings_global.json path to contain only the GET operation
  • Created separate /settings_global path for the POST operation

Implementation vs Documentation

Actual endpoints (script/rvd_front):

get '/settings_global.json' => sub($c) {  # Line 405
    return $c->render(json => $RAVADA->settings_global );
};

post '/settings_global' => sub($c) {      # Line 410
    $RAVADA->update_settings_global($arg, $USER, \$reload);
    return $c->render(json => { ok => 1, reload => $reload });
};

The OpenAPI spec now matches this implementation with two distinct path entries.

Original prompt

This section details on the original issue you should resolve

<issue_title>FIX settings_global API doc</issue_title>
<issue_description>In the openapi.yaml file:

The POST endpoint path is incorrect. According to script/rvd_front line 410, the POST endpoint is /settings_global (without .json suffix), but the OpenAPI spec documents it as /settings_global.json. The GET endpoint at line 405 correctly uses /settings_global.json. These should be documented as two separate paths: /settings_global.json (GET only) and /settings_global (POST only).
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: frankiejol <136835+frankiejol@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix settings_global API documentation for endpoints Fix settings_global API documentation: separate GET and POST paths Jan 15, 2026
Copilot AI requested a review from frankiejol January 15, 2026 10:44
@frankiejol frankiejol marked this pull request as ready for review January 15, 2026 10:48
Copilot AI review requested due to automatic review settings January 15, 2026 10:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the OpenAPI specification to accurately document the two distinct endpoints for global settings, aligning the documentation with the actual implementation in script/rvd_front.

Changes:

  • Separated /settings_global.json path definition to contain only the GET operation (retrieves global settings)
  • Created a new /settings_global path definition for the POST operation (updates global settings)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@frankiejol frankiejol merged commit f6cb584 into main Jan 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FIX settings_global API doc

2 participants