cakephp-dto icon indicating copy to clipboard operation
cakephp-dto copied to clipboard

Relax spec filename requirements

Open jorisvaesen opened this issue 3 years ago • 1 comments

I don't see any reason for forcing filename requirements other than the extension. Since we are only scanning the dto folder, it should not contain any other files with that extension than specifications.

In the future i even think relaxing the configPath should be an option, hardcoded forcing the dto folder seems unnecessary when the path to scan is easily configurable.

jorisvaesen avatar Aug 23 '22 09:08 jorisvaesen

Codecov Report

Merging #56 (883dad9) into master (10427ba) will increase coverage by 0.04%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master      #56      +/-   ##
============================================
+ Coverage     81.73%   81.77%   +0.04%     
  Complexity      460      460              
============================================
  Files            17       17              
  Lines          1040     1037       -3     
============================================
- Hits            850      848       -2     
+ Misses          190      189       -1     
Impacted Files Coverage Δ
src/Generator/Finder.php 100.00% <100.00%> (+7.14%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Aug 23 '22 09:08 codecov-commenter

It was mainly to easier loop through all files here. But we probably dont need it, yes. Any reason why we would want to relax this more?

dereuromark avatar Oct 31 '22 15:10 dereuromark

When the search path would be configurable, it would relax folder structure requirements which could collide with existing structures. Also, it would allow developers to not put all api specs in the same folder. It could be cleaner to split them up in subfolders.

jorisvaesen avatar Nov 14 '22 12:11 jorisvaesen