Powerful IDE for API-first design, documentation and development.

Start my Free Trial

Occasionally, you may find that RepreZen API Studio ascribes the wrong file type to a file with a .yaml extension, and shows validation errors associated are not relevant to the actual file. For example: 

  • An OpenAPI v3 file or a plain YAML file (not an API document at all) may erroneously appear in the Project Explorer with a Swagger icon, and show error markers wherever your file doesn't conform to OpenAPI v3.
  • A Swagger file (OpenAPI v2) or plain YAML file may erroneously appear in the Project Explorer with an OpenAPI v3 icon, and show error markers wherever your file doesn't conform to OpenAPI v2.
  • An Swagger or OpenAPI file may appear as a plain text file in Project Explorer, and not offer the expected code assist, validation and other features when opened in the editor. 

KaiZen OpenAPI Editor, RepreZen's open source editing component, includes components called recognizers that determine whether the editor contains a Swagger-OpenAPI 2.0 document, an OpenAPI 3.0 document, or a plain YAML file that is neither of these.  Occasionally the recognizers don't accurately determine the type of content.  

First Try: Close and Reopen the Editor

Sometimes this issue can be resolved by simply closing and reopening the file:

  1. If the incorrectly recognized YAML file is open in an editor window, close the editor. 
  2. Double-click the file in the Project Explorer to open it in an editor. 
  3. If any incorrect error markers remain, delete them from the Problems View:
    • Open the Problems view.
    • Select the error markers that have been applied incorrectly to your file.
    • Press the Delete key or use the right-click context menu to delete them.

Second Try: Open the File in the Correct Editor

If the first try didn't work:

  1. If the incorrectly recognized YAML file is open in an editor window, close the editor. 
  2. In Project Explorer, right-click the file, look in the Open With submenu, and choose the appropriate editor:
    • If the file is a plain YAML file, choose Open With > YEdit YAML Editor.
    • If the file is a Swagger (OpenAPI v2) file, choose Open With > Swagger Editor.
    • If the file is an OpenAPI v3 file, choose Open With > OpenAPI v3 Editor.
    • If you don't see the editor you need in the submenu, choose Open With > Other... and find the editor in the Editor Selection dialog:
  3. If any incorrect error markers remain, delete them from the Problems View, as shown above.

The file should now appear in the Project Explorer with the correct icon, and should validate correctly the editor.