cancel
Showing results for 
Search instead for 
Did you mean: 

Does swagger json / yaml have a specific identifier?

Jojoba123
Occasional Visitor

Does swagger json / yaml have a specific identifier?

I wanna detect a swagger file via google extension so ı need a specific identifiers. I didn't find any value except open api: and swagger:

1 REPLY 1
HKosova
Moderator

Re: Does swagger json / yaml have a specific identifier?

An OpenAPI file is a YAML or JSON file that has a field named swagger or openapi at the root level.

For example:

{
  "swagger": "2.0",
  ...
}

or

openapi: 3.0.3
info:
  title: test
  version: 1.0.0
paths:
  ...

 

There are also parsers for various programming languages that can tell you if a file is a valid OpenAPI file.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Top Kudoed Authors