Edit and Validate OpenAPI Documents
An OpenAPI (OA) document is written in YAML or JSON and conforms to the OA specification (OAS, implemented formally as a JSON Schema).
Editing support for OpenAPI documents
XMLSpy provides the following editing and processing features for OpenAPI documents:
•Detects OpenAPI documents (in YAML or JSON format) according to content
•Reads the OpenAPI version from the mandatory openapi keyword
•Validate the OpenAPI document against the detected OAS version
•Shows document information in the Info Window
•Enables editing in both Text View and Grid View. The editing features of these two views are available where relevant—for example syntax highlighting and folding margins
•Provides auto-completion and entry helper support
•Provides YAML templates for new OpenAPI Documents. A template file is available for each of the supported OAS versions
•On switching the OpenAPI document to Schema View, provides graphical editing of the document's internal schemas
Validate OpenAPI documents
XMLSpy validates OA documents against the following OAS versions: 2.0, 3.0, 3.1, and 3.2.
Each OA document begins with a mandatory key, as listed in the table below, and the corresponding key value.
OAS Version | Key | Value |
2.0 | swagger | 2.0 |
3.0 | openapi | 3.0.x |
3.1 | openapi | 3.1.x |
3.2 | openapi | 3.2.x |
To validate the active OpenAPI document, select the menu command XML | Validate XML (F8). The OA document will be validated against the corresponding OAS and any additional internal schemas that the document may contain.