question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alternative filename spacers when spliting api paths other than @.

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
adamaltmancommented, Feb 16, 2022

@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

0reactions
RomanHotsiycommented, Sep 23, 2022

@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 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Split string on spaces except file paths - java - Stack Overflow
I consider escaped paths to be of the form /folder/part1\ part2.txt , but alternative syntaxes when reasonable are valid too. If easier string....
Read more >
How do I use find when the filename contains spaces?
An alternative would be to use find 's -exec or -execdir options. The first of the following will feed the filenames to somecommand...
Read more >
bash - Filenames with spaces breaking for loop, find command
This way you delimit the filenames with null ( \0 ) characters, this means that variation in space and other special characters will...
Read more >
How To Deal With Spaces in Paths on Mac and Linux - Medium
Spaces are interpreted by the shell as special characters that separate command line arguments, so paths containing spaces are split into ...
Read more >
Splitting, Concatenating, and Joining Strings in Python
In this beginner-friendly article, you'll learn some of the most fundamental string operations: splitting, concatenating, and joining.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found