Alternative filename spacers when spliting api paths other than @.
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m always frustrated when my filenames deviate too far from the standard of my files.
paths/resource@{parameter}.yaml
Describe the solution you’d like
It would be nice if you could specify the spacer used when splitting openapi specifications.
Instead of @
I would like to specify _
or -
through the command
i.e openapi split api.yaml --outDir myDir --spacer _
results in paths/resource@{parameter}.yaml
Bundle would need an option to interpret the spacer aswell
i.e openapi bundle .... --spacer _
Describe alternatives you’ve considered None.
Additional context I believe the path file name logic is located here https://github.com/Redocly/openapi-cli/blob/master/packages/cli/src/utils.ts#L90
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
@jasonbstanding I think your issue is a bug (it’s different from this issue which is a feature request about the
split
command). I opened this issue you may want to follow: https://github.com/Redocly/openapi-cli/issues/560@TylerRick thanks for so detailed write up.
We’ll just consider using
/
as a separator 🙌We used
@
in the first place due to historical reasons, a few years ago our tool did not use $refs and relied on the directory structure to combine paths. In that case having flat file system was much easier. I think it was just a “tunnel vision” to replace@
with_
and not with/
. But I’ll have to double-check if we can safely do it and if there are not any other reasons for this 😄