Skip to content

Commit 3bb65a8

Browse files
authored
docs: add initial SpecLynx OpenAPI Toolkit documentation
1 parent 95d1690 commit 3bb65a8

File tree

1 file changed

+235
-9
lines changed

1 file changed

+235
-9
lines changed

README.md

Lines changed: 235 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
<div align="center">
1+
<div>
22
<a href="https://speclynx.com"><img width="739" height="103" alt="image" src="https://github.com/user-attachments/assets/87c88ea9-5746-497a-8c33-43fa55b72b0b" /></a>
3+
<br><br>
34
<p>
45
Stop wrestling with OpenAPI specs — SpecLynx OpenAPI Toolkit delivers the most effective way to author and manage your API specs, bringing unprecedented ease, pinpoint accuracy, and unmatched power directly to your VSCode workflow.
56
</p>
6-
<br>
7-
<h1>Launching Soon!</h2>
8-
<p>
9-
SpecLynx OpenAPI Toolkit will be available during August 2025! Join our <strong><a href="https://speclynx.com?ref=github-waitlist">waitlist</a></strong> to get early access to SpecLynx in August 2025.
10-
</p>
117
</div>
128

139
<br>
@@ -24,14 +20,244 @@ Get full YAML/JSON autocompletion, inline documentation hints, validation, linti
2420

2521
### One-Click Tooling
2622

27-
- Quick Starts & Conversions
28-
- Reformat & Reorder
23+
- Powered by a powerful [Language Server](https://microsoft.github.io/language-server-protocol/)
24+
- JSON Schema Validation
2925
- Semantic Validation & Linting
30-
- Breaking change detection
26+
- Spectral Validation & Linting
27+
- OpenAPI Description dereferencing
3128
- Workspace-Wide Operations
3229

3330
All these commands — and more — are just a keystroke away in VS Code, so you can focus on designing great APIs instead of wrestling with tooling.
3431

3532
### Built by Veterans
3633

3734
SpecLynx OpenAPI Toolkit is crafted by industry veterans, [Vladimír Gorej](https://vladimirgorej.com) and [Francesco Tumanischvili](https://github.com/frantuma), who bring over **15 years of dedicated experience maintaining and evolving Swagger/OpenAPI tools**. Their unparalleled expertise ensures you receive a solution with battle-tested reliability and best practices meticulously baked into every feature.
35+
36+
## What is it?
37+
38+
OpenAPI Toolkit provides advanced editing, processing, rendering, and execution capabilities for Swagger/OpenAPI files (2.0, 3.0, 3.1). These include an editor experience — offering validation/linting, completion, documentation, syntax highlighting, reference navigation, and more — along with a preview panel (based on Swagger UI) for rendering the OpenAPI document and allowing interaction and execution.
39+
40+
Several capabilities are unique in the VS Code OpenAPI ecosystem, such as Spectral support in the web, custom semantic linting, in-context documentation (including in completion items), full JSON/YAML parity, and rich reference handling.
41+
42+
We are actively expanding the feature set and fixing bugs; this documentation will be updated accordingly.&#x20;
43+
44+
## Capabilities
45+
46+
### Editor
47+
48+
#### Foreword
49+
50+
**JSON and YAML** — OpenAPI Toolkit provides the same level of support for OpenAPI specs written in JSON or YAML. It also aims to provide editor capabilities even for not-well-formed documents (for example, offering completion and syntax highlighting where possible).
51+
52+
**Swagger/OpenAPI 2.0, OpenAPI 3.0, and 3.1** — OpenAPI Toolkit supports all of these versions with a consistent feature set.
53+
54+
55+
<img width="792" height="785" alt="image" src="https://github.com/user-attachments/assets/3d2f492d-181c-4952-9784-137411d76590" />
56+
<img width="948" height="1173" alt="image" src="https://github.com/user-attachments/assets/6a97d11c-47da-4c28-aeca-60305bdbe95d" />
57+
58+
<br><br>
59+
60+
**Web support** — OpenAPI Toolkit is designed to run both on Desktop and in Web environments such as [vscode.dev](https://vscode.dev/), [github.dev](https://github.dev/), and [GitHub Codespaces](https://github.com/features/codespaces). It is one of the few extensions that deliver advanced OpenAPI editing and validation/linting in the web environment.&#x20;
61+
62+
#### In-context OpenAPI Documentation (hover)
63+
64+
When you hover over a keyword (node key) in the document, the extension shows full, context-aware documentation in a hover panel that corresponds to the selected construct and matches the official specification.
65+
66+
<img width="1562" height="573" alt="image" src="https://github.com/user-attachments/assets/7aaf568d-9a2f-4d4f-bb63-9d38db654579" />
67+
68+
69+
The same documentation is also shown in the details pane of completion items. See the “Completion / Suggestions” section below.&#x20;
70+
71+
#### Completion / Suggestions
72+
73+
OpenAPI Toolkit provides an enriched completion experience. Under the hood, completion is driven by a semantic understanding of the node where completion is triggered, making suggestions far more precise and useful than standard JSON-Schema-based completion.&#x20;
74+
75+
##### Completion docs
76+
77+
Each completion item includes full documentation (the same content shown in hover).
78+
**Tip:** If the documentation panel doesn’t appear to the right of the completion label, click the `>` icon that appears when you hover the completion entry.&#x20;
79+
80+
<img width="916" height="403" alt="image" src="https://github.com/user-attachments/assets/1d90a38b-427a-4b23-a8f8-aeaa1aa2d448" />
81+
82+
##### References completion
83+
84+
When completion is triggered within the value of a `$ref` field, the editor offers suggestions of compatible targets found in the document (this will be expanded to include documents across the workspace). It also displays the referenced content in the completion box, providing an in-context view of potential references without losing focus&#x20;
85+
86+
<img width="1008" height="440" alt="image" src="https://github.com/user-attachments/assets/d293593c-332a-4183-abca-5cbf944176cb" />
87+
88+
89+
##### Context-aware completion (e.g., `type: integer``format`)
90+
91+
Suggestions adapt to related fields. For example, if a schema sets `type: integer`, the `format` suggestions include only compatible values.&#x20;
92+
93+
<img width="967" height="448" alt="image" src="https://github.com/user-attachments/assets/6ef34a33-f7b4-4341-9edb-e8641e626914" />
94+
95+
96+
#### References
97+
98+
##### Reference target content in hover
99+
100+
Hovering over the value of a `$ref` field displays the referenced content in the hover box, providing an in-context view of references without losing focus.&#x20;
101+
102+
<img width="657" height="521" alt="image" src="https://github.com/user-attachments/assets/4882f6e3-7b13-4cd7-84ab-8ce2e3a4081c" />
103+
104+
105+
106+
##### Go to definition (F3)
107+
108+
Right-click the value of a `$ref` field and choose **Go to Definition** (or press **F3**) to jump to the reference target—either within the current file or in another file in the workspace.&#x20;
109+
110+
<img width="699" height="401" alt="image" src="https://github.com/user-attachments/assets/a5c1610a-1c06-4c8d-8316-46f953755cd8" />
111+
112+
##### Go to references
113+
114+
Right-click a key (for example, under `components.schemas`) and choose **Go to References** to open a panel listing available references to jump to.&#x20;
115+
116+
<img width="2070" height="385" alt="image" src="https://github.com/user-attachments/assets/2cb17ad2-cd43-4945-94a7-746c6397a82a" />
117+
118+
119+
##### Find all references
120+
121+
Right-click a key (for example, of a schema) and choose **Find All References** to open the References panel listing every usage of the selected target.&#x20;
122+
123+
<img width="902" height="459" alt="image" src="https://github.com/user-attachments/assets/9b00b3b1-03f3-4252-b7b9-4a853f00783d" />
124+
125+
##### Dereference command
126+
127+
Right-click inside an OpenAPI document or right-click the file in the Explorer, then choose **OpenAPI Toolkit → Dereference API Document** to save a dereferenced copy locally. The default output name is `{filename}-dereferenced.{extension}`.&#x20;
128+
129+
<img width="805" height="450" alt="image" src="https://github.com/user-attachments/assets/e7bc9c2b-95be-4508-8212-1f2dd99334c3" />
130+
131+
132+
#### Syntax Highlighting
133+
134+
OpenAPI Toolkit provides **semantic** syntax highlighting, going beyond basic keyword coloring. Specific OpenAPI elements—such as operations, schemas, and reference objects—are highlighted with distinct colors and font styles. This helps you quickly recognize and distinguish different parts of an API definition, improving readability and navigation in complex specifications.&#x20;
135+
136+
<img width="1303" height="1108" alt="image" src="https://github.com/user-attachments/assets/b67c64b5-771d-4eb1-81d3-359872e7607b" />
137+
138+
#### Validation and Linting
139+
140+
##### Definitions
141+
142+
* **Validation** — Checks that the document conforms to the OpenAPI and JSON Schema specifications.
143+
* **Linting** — Analyzes an OpenAPI document against a configurable ruleset. Unlike validation (which only checks spec conformance), linting enforces best practices, style guidelines, and quality standards. It can catch issues such as inconsistent naming, missing descriptions, or patterns that harm API usability—even when the document is technically valid.
144+
* **Semantic validation** — Validates using rules that target semantic properties of elements (e.g., `operation`, `schema`) rather than only applying JSON Schema. This enables more precise checks and clearer diagnostics (including highlighting the exact key, value, or child node that’s wrong).
145+
* **Semantic linting** — Lints using rules that can target semantic element types and/or JSONPath expressions. Compared to tools that only support JSONPath, this hybrid approach simplifies writing targeted rules (including for nested elements) and yields more precise editor markings.&#x20;
146+
147+
##### Validation/Linting modes
148+
149+
OpenAPI Toolkit supports three modes, which you can combine:
150+
151+
1. **JSON Schema validation** — Standard validation based on OpenAPI JSON Schemas
152+
2. **Spectral validation and linting**
153+
3. **Semantic validation and linting**&#x20;
154+
155+
<img width="1198" height="1204" alt="image" src="https://github.com/user-attachments/assets/36d55b1d-6cfa-41db-8656-1242e3e946c0" />
156+
157+
##### Default configuration
158+
159+
By default, JSON Schema validation and **semantic linting** are enabled. You can change this in the extension settings. **Semantic validation** is currently disabled by default because it has not yet completed a full compliance test cycle; once complete, it is expected to become the default validation method.&#x20;
160+
161+
##### Spectral validation/linting
162+
163+
To enable Spectral-based checks:
164+
165+
1. Enable **Apply Spectral Validation** in the extension settings.
166+
2. Provide a ruleset by either:
167+
**(a)** adding a `.spectral.json`, `.spectral.yaml`, or `.spectral.yml` at the root of your workspace, **or**
168+
**(b)** setting the Spectral ruleset file path in the extension settings, or via the command **OpenAPI Toolkit: Pick Spectral Validation/Linting Rules File** (available from the editor context menu or the Explorer).
169+
170+
Refer to the [Spectral documentation](https://docs.stoplight.io/docs/spectral/) for ruleset format details.&#x20;
171+
172+
<img width="1325" height="281" alt="image" src="https://github.com/user-attachments/assets/1cb7691d-7fba-4b82-96b8-3a0344aa2ba4" />
173+
174+
<img width="802" height="396" alt="image" src="https://github.com/user-attachments/assets/2bfd9175-a42b-43e2-96ad-1217b60bebcd" />
175+
176+
##### Semantic validation
177+
178+
Enable **Apply Semantic Validation** in the extension settings. No rules file is required to run the built-in semantic validation checks.&#x20;
179+
180+
<img width="881" height="108" alt="image" src="https://github.com/user-attachments/assets/6245a7f4-71d2-46f9-a271-b031728ace4c" />
181+
182+
##### Semantic linting
183+
184+
To run semantic linting:
185+
186+
1. Enable **Apply Semantic Linting** in the extension settings.
187+
2. Provide a ruleset by either:
188+
**(a)** adding a rules file at the workspace root named `.speclynx.json`, `.speclynx.yaml`, `.speclynx.yml` (or without the leading dot), **or**
189+
**(b)** setting the semantic ruleset file path in the extension settings, or via the command **OpenAPI Toolkit: Pick Semantic Validation/Linting Rules File** (available from the editor context menu or the Explorer).&#x20;
190+
191+
##### Semantic linting rules (overview)
192+
193+
Semantic lint rules are defined in JSON or YAML. A ruleset typically includes:
194+
195+
* **Rule ID** and **description/message**
196+
* **Severity** (e.g., error, warning, info)
197+
* **Target selector**: a semantic **element type** (e.g., `operation`, `schema`, `parameter`, etc.) and/or a **JSONPath** for precise targeting
198+
* **Condition(s)** to evaluate (e.g., required fields, naming patterns, min/max constraints)
199+
* **Optional fixes** or suggestions (when applicable)
200+
201+
<img width="626" height="318" alt="image" src="https://github.com/user-attachments/assets/a2f3e0d8-8178-43a6-b26c-f1678b3a7622" />
202+
203+
A separate section provides the complete rule schema and examples. *(If you don’t see it yet, it will be added as the rules stabilize.)*&#x20;
204+
205+
##### Supported major element “types” for semantic checks
206+
207+
* callback
208+
* components
209+
* contact
210+
* content
211+
* definitions
212+
* discriminator
213+
* encoding
214+
* example
215+
* external-documentation
216+
* header
217+
* headers
218+
* info
219+
* items
220+
* license
221+
* link
222+
* media-type
223+
* oauth-flow
224+
* oauth-flows
225+
* openapi
226+
* openapi3\_0
227+
* openapi3\_1
228+
* operation
229+
* parameter
230+
* parameters-definitions
231+
* path-item
232+
* paths
233+
* path-template
234+
* reference
235+
* request-body
236+
* response
237+
* responses
238+
* responses-definitions
239+
* schema
240+
* scopes
241+
* security-definitions
242+
* security-requirement
243+
* security-scheme
244+
* server
245+
* server-variable
246+
* swagger
247+
* tag
248+
* xml
249+
250+
*(These are the current high-level element types recognized by the semantic engine.)*&#x20;
251+
252+
---
253+
254+
### Preview
255+
256+
257+
The Preview panel (powered by Swagger UI) renders the current OpenAPI document and lets you interact with it:
258+
259+
* **Live rendering** — Quickly verify how changes look without leaving the editor
260+
* **Server selection & auth** — Choose servers and authorize requests where applicable
261+
* **Try it out** — Execute operations directly from the preview to validate requests/responses during development
262+
263+
This helps you validate the specification from both a structural and a consumer point of view.&#x20;

0 commit comments

Comments
 (0)