cancel
Showing results for 
Search instead for 
Did you mean: 

is there a reason why the specification file you want to use in your project need a file ending

SOLVED
Highlighted
Occasional Contributor

is there a reason why the specification file you want to use in your project need a file ending

When i'm in readyAPI and select new Project and enter the URL or File Path to the definition file then readyAPI fails to create a project since the files does not have a file ending with .yaml / .yml. and i'm curious as to why that is the case. Can't you just parse the first line of the file to figure out if its a swagger file or not and not blindly go after the file ending?


We have an internal space where all specification is stored with the filename "spec" and if i point to readyAPI to http:/www/api-specification/1.0/spec then it will fail to create the project which forces me to download, rename and then create project from c:\xxx\yyy\spec.yaml something i really would like to avoid

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: is there a reason why the specification file you want to use in your project need a file ending

Hey @TwoFang 

 

erm......ok - this is me, not knowing anything about anything - Im just using some educational guesses here.

 

The use of file extensions to determine the file type has been standard in windows (dunno about MAC, but I know UNIX doesnt rely on file extensions, it uses heuristics to determine the filetype) since....well windows started.  Changing the approach of parsing the file first to determine the type doesnt sound like a big deal (apart from adding a little latency before determining if the file is the correct type I suppose) but im guessing that its a little more complicated than that if ReadyAPI! actually hooks into the windows operating system to open a file (which Im guessing it probably does - theres no point rewriting windows 'FileOpen()' method thats been working fine for 30 years, right? )

 

In regards to just pointing to the directory which contains the .yaml file - could there ever be a situation in which >1 .yaml exists in a single directory?

 

ok - that completely summarises my total guesswork on this subject! 🙂

 

you could perhaps submit a new feature request if this is getting to be too much of a problem for you?

 

nice one

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

1 REPLY 1
Highlighted
Community Hero

Re: is there a reason why the specification file you want to use in your project need a file ending

Hey @TwoFang 

 

erm......ok - this is me, not knowing anything about anything - Im just using some educational guesses here.

 

The use of file extensions to determine the file type has been standard in windows (dunno about MAC, but I know UNIX doesnt rely on file extensions, it uses heuristics to determine the filetype) since....well windows started.  Changing the approach of parsing the file first to determine the type doesnt sound like a big deal (apart from adding a little latency before determining if the file is the correct type I suppose) but im guessing that its a little more complicated than that if ReadyAPI! actually hooks into the windows operating system to open a file (which Im guessing it probably does - theres no point rewriting windows 'FileOpen()' method thats been working fine for 30 years, right? )

 

In regards to just pointing to the directory which contains the .yaml file - could there ever be a situation in which >1 .yaml exists in a single directory?

 

ok - that completely summarises my total guesswork on this subject! 🙂

 

you could perhaps submit a new feature request if this is getting to be too much of a problem for you?

 

nice one

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors