Skip to content

feat: Enhance script object 'api' with parameter accessor methods#1241

Merged
tangcent merged 1 commit intomasterfrom
feature/rule
Apr 17, 2025
Merged

feat: Enhance script object 'api' with parameter accessor methods#1241
tangcent merged 1 commit intomasterfrom
feature/rule

Conversation

@tangcent
Copy link
Owner

Add new functions to the script 'api' object to access query parameters, form parameters, and path parameters with wrapper objects that provide full manipulation capabilities. This makes it easier for rule scripts to retrieve and manage request parameters in a more object-oriented way.

  • Add methods to retrieve parameters: params(), param(name), params(name)
  • Add methods to retrieve form parameters: formParams(), formParam(name), formParams(name)
  • Add methods to retrieve path parameters: pathParams(), pathParam(name), pathParams(name)

@github-actions github-actions bot added the type: new feature Add New Feature label Apr 15, 2025
@github-actions
Copy link
Contributor

📦 Plugin has been packaged for this PR. You can download easy-yapi-2.8.0.212.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 33 lines in your changes missing coverage. Please review.

Project coverage is 54.576%. Comparing base (ec92623) to head (c88e59c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ent/idea/plugin/api/export/rule/RequestRuleWrap.kt 76.923% 1 Missing and 32 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##              master     #1241       +/-   ##
===============================================
+ Coverage     54.442%   54.576%   +0.134%     
- Complexity      2761      2773       +12     
===============================================
  Files            289       289               
  Lines          16478     16586      +108     
  Branches        3692      3710       +18     
===============================================
+ Hits            8971      9052       +81     
  Misses          5826      5826               
- Partials        1681      1708       +27     
Flag Coverage Δ
unittests 54.576% <76.923%> (+0.134%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ent/idea/plugin/api/export/rule/RequestRuleWrap.kt 78.706% <76.923%> (-1.522%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec92623...c88e59c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tangcent tangcent merged commit f58211a into master Apr 17, 2025
15 checks passed
@tangcent tangcent deleted the feature/rule branch April 17, 2025 00:02
@github-actions github-actions bot mentioned this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: new feature Add New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant