Skip to content
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

OHRM5X-1757: Write Performance - API doc with OpenAPI #1464

Merged
merged 5 commits into from
Sep 30, 2022

Conversation

SharukaNP
Copy link
Contributor

Complete API documentation for Performance Plugin

@SharukaNP SharukaNP changed the base branch from main to 5.2-api-doc September 26, 2022 06:46
@SharukaNP SharukaNP marked this pull request as draft September 26, 2022 07:05
@SharukaNP SharukaNP marked this pull request as ready for review September 30, 2022 03:56
@@ -23,6 +23,8 @@

class ReviewEmployeeSupervisorSearchFilterParams extends FilterParams
{
public const ALLOWED_SORT_FIELDS = ['employee.empNumber'];
Copy link
Member

Choose a reason for hiding this comment

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

seems some validation rules missing in ReviewEmployeeSupervisorAPI::getValidationRuleForGetAll

        return new ParamRuleCollection(
            $this->getValidationDecorator()->notRequiredParamRule(
                new ParamRule(
                    CommonParams::PARAMETER_EMP_NUMBER,
                    new Rule(Rules::POSITIVE)
                ),
            ),
            $this->getValidationDecorator()->notRequiredParamRule(
                new ParamRule(
                    self::FILTER_NAME_OR_ID,
                    new Rule(Rules::STRING_TYPE),
                    new Rule(
                        Rules::LENGTH,
                        [null, self::PARAM_RULE_FILTER_NAME_OR_ID_MAX_LENGTH]
                    ),
                )
            ),
            // following line seems missing
            ...$this->getSortingAndPaginationParamsRules(ReviewEmployeeSupervisorSearchFilterParams::ALLOWED_SORT_FIELDS),
        );

@RajithaKumara RajithaKumara changed the title OHRM5X-1755 -Api docs for Performance plugin OHRM5X-1757: Write Performance - API doc with OpenAPI Sep 30, 2022
@RajithaKumara RajithaKumara merged commit d4b5cd0 into orangehrm:5.2-api-doc Sep 30, 2022
RajithaKumara pushed a commit to RajithaKumara/orangehrm that referenced this pull request Oct 25, 2022
Super-Chama pushed a commit to Super-Chama/orangehrm that referenced this pull request Dec 13, 2022
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.

None yet

2 participants