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

Update docs with new --tag and --match-path features #134

Merged
merged 15 commits into from
Aug 31, 2023
Merged

Conversation

christianhelle
Copy link
Owner

This adds missing documentation related to the changes implemented in #132 and #131

Additional examples were added to the 'Refitter' program configuration to make it more comprehensive. These additions include the usage of the '--tag' option for 'Pet', 'Store', and 'User'. Also, a new example for the '--match-path' option was included.
This commit adds examples and explanations for new command options --match-path and --tag in README.md and Refitter/README.md. This update is necessary to properly guide users on how to use these new features mainly to filter the generated code based on Paths and Endpoints.
The smoke-tests.ps1 file has been amended to include two new calls to the GenerateAndBuild function. These additions implement checks for tag filtering ("--tag pet") and match-path filtering ("--match-path ^/pet/.*") in the tests. This change ensures our test suite covers these two types of filtering, thus enhancing its comprehensiveness.
In order to maintain alphabetical order and enhance readability, the "petstore" filename in the test array has been moved up in the list in smoke-tests.ps1 script. The tests execution order remains unaffected by this change.
The provided diff mainly refactors two GitHub Action workflows - smoke-tests.yml and template.yml. In smoke-tests.yml, a new argparse functionality is introduced to support command-line arguments. This new implementation allows commands to accept arguments and utilize them as options, hence making it more flexible and directly simplifying the command calls in template.yml.

On the other hand, in template.yml, gone are the multiple, hard-coded command calls and repetition of common functionality, replaced with a more rationalized and easier-to-maintain single command call taking advantage of the newly added argparse functionality.

This change improves command structuring, making the workflow code modular, easy to read, and increases maintainability and scalability.
The commit modifies the 'args' field in template.yml workflow file. The 'required' status for 'args' was changed from 'true' to 'false', providing more flexibility in the use of this field as it is no longer mandatory.
This commit moves the `args` block from the individual job configurations in `smoke-tests.yml` to a shared `strategy.matrix.args` section in the shared `template.yml`. This allows for the arguments to be reused across different jobs and workflows, improving the maintainability and consistency of our GitHub Actions configurations.
@christianhelle christianhelle self-assigned this Aug 31, 2023
@christianhelle christianhelle added the documentation Improvements or additions to documentation label Aug 31, 2023 — with GitHub Codespaces
@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #134 (5eb98b0) into main (8293850) will not change coverage.
Report is 3 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #134   +/-   ##
=======================================
  Coverage   98.44%   98.44%           
=======================================
  Files          34       34           
  Lines        1094     1094           
=======================================
  Hits         1077     1077           
  Misses          6        6           
  Partials       11       11           
Flag Coverage Δ
unittests 98.44% <ø> (ø)

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

@christianhelle christianhelle merged commit 2287625 into main Aug 31, 2023
742 checks passed
@christianhelle christianhelle deleted the filter-docs branch August 31, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant