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

Add Powershell script parameters #2

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

christianhelle
Copy link
Owner

The changes here update the generated Powershell scripts to contain mandatory parameters if the operation path or query contains parameters

For example:

<#
  Request: GET /pet/{petId}
  Summary: Find pet by ID
  Description: Returns a single pet
#>
param(
   <# ID of pet to return #>
   [Parameter(Mandatory=$True)]
   [String] $petId
)

curl -X GET https://petstore3.swagger.io/api/v3/pet/$petId `
  -H 'Accept: application/json' `
  -H 'Content-Type: application/json'

@christianhelle christianhelle added the enhancement New feature or request label Dec 30, 2023
@christianhelle christianhelle self-assigned this Dec 30, 2023
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Dec 30, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (d9697bd) 86.29% compared to head (212fda5) 85.61%.
Report is 7 commits behind head on main.

Files Patch % Lines
src/CurlGenerator.Core/ScriptFileGenerator.cs 65.62% 0 Missing and 11 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #2      +/-   ##
==========================================
- Coverage   86.29%   85.61%   -0.69%     
==========================================
  Files          20       20              
  Lines         540      556      +16     
==========================================
+ Hits          466      476      +10     
  Misses         56       56              
- Partials       18       24       +6     
Flag Coverage Δ
unittests 85.61% <67.64%> (-0.69%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@christianhelle christianhelle merged commit 5d5c5b0 into main Dec 30, 2023
218 of 220 checks passed
@christianhelle christianhelle deleted the powershell-script-parameters branch December 30, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant