AI OpenAPI LCNE Studio — OpenAPI + Low-Code/No-Code
AI OpenAPI LCNE Studio is a VS Code extension for designing, editing, validating, and previewing OpenAPI (Swagger) specifications with an API‑led, AI‑assisted workflow—plus low‑code/no‑code Camel K development. It supports Spectral linting, mock testing, docs generation, and a Camel K (Dev) preview.

Key features
- Generate OpenAPI YAML from natural language prompts (AI-assisted)
- Optional supporting docs (designs, contracts) for richer generation
- Edit YAML with a live Swagger UI preview
- Lint and validate with Spectral, plus optional heavy validation
- Run Mock API and Prism request tests
- Generate developer documentation (Markdown + Mermaid diagrams)
- Camel K (Dev) preview UI to sketch Integrations from your OpenAPI
Getting started
- Install dependencies and build
npm install
npm run build
- Run the extension in an Extension Development Host
- Press F5 in VS Code (or use “Run Extension”).
- Command Palette → “AI OpenAPI LCNE Studio” to open the webview.
- Set an AI API key (first-time only)
- In the webview, use the banner action or the “Set API Key” button when prompted.
- Keys are stored securely with VS Code SecretStorage on your machine.
Tab-by-tab guide
Below describes each top navigation step and how to use it.
1. Describe
- Purpose: Generate an OpenAPI YAML from a short prompt.
- First-time: set your AI key when prompted (banner or “Set API Key”).
- Enter a description in the prompt box (e.g., “Design a Hello API with POST /hello that returns {message}”).
- Options:
- Add authentication: include a bearer token security scheme in the output.
- Include request validation: add schema constraints, examples, and required fields.
- Premium note: uploading supporting documents is gated and will show a license warning when clicked.
- Click “Generate” to produce a raw YAML. The YAML will auto‑sync to Edit and Validate.
2. Edit YAML
- Left: a YAML editor (CodeMirror) with monokai theme and key coloring.
- Right: live Swagger UI preview of the current YAML.
- “Load YAML” syncs edits back into the shared state (and triggers lint).
- Quick export from this tab is available.
- Premium‑gated: Context‑aware suggestions and Agentic AI edit are visible but disabled without a license.
3. Linter/Validator
- Runs Spectral rules against your spec; shows results in a table.
- Click rows to jump/highlight the referenced lines in Edit/Validate editors.
- Parse errors are surfaced as “yaml-parse” with best‑effort line mapping.
- Heavy validation: optionally runs @apidevtools/swagger-parser checks.
4. Security Analyzer
- Positions security checks as complementary to Spectral (OWASP‑style guidance).
- Preview/premium messaging clarifies that advanced findings may require a license.
5. Mock API
- Simplified Postman-like tester powered by the Mock server.
- Start/Stop mock server; compose requests with params/headers/body.
- Inspect response body/headers and small validation outputs.
6. Prism (Advanced)
- Advanced request testing with Prism; validation messages parsed and shown.
- Auto-starts Prism on first send if not running. Shows response time, status, and headers.
7. Generate Docs
- Produces developer documentation (Markdown) from your YAML + options.
- Options: Change History, Sequence Diagrams (Mermaid), Config Steps, NFRs.
- Raw/Preview toggle renders Markdown nicely (Mermaid diagrams supported).
8. Camel K (Dev) — Preview
- UI‑only scaffold to sketch Camel K Integrations from your OpenAPI.
- Inputs (left):
- API Source: use current OpenAPI or upload a spec (file input shown; upload not wired).
- Backend Descriptor:
- Option A: Small form (Base URL, Paths, Auth type, Default headers, Timeout)
- Option B: Upload backend YAML/OpenAPI/Postman (file input not wired)
- Mapping Designer (MVP): choose API operation → backend endpoint; map request/response fields; optional jq/JS transforms; toggles for auth/add‑headers; optional free‑form prompt.
- Outputs (right):
- Raw YAML: a stub Integration (platform-http route → backend) generated locally in the webview.
- Preview: friendly summary (routes, backend endpoint, headers, traits/secrets placeholders).
- Validation: placeholder text for future dry‑run/schema sanity.
- Footer actions:
- Generate Camel K: produces the stub Integration YAML and displays it.
- Validate (dry‑run): placeholder notification (CLI detection planned).
- Deploy / Undeploy / Logs: placeholder notifications (kamel detection planned).
9. CI/CD (GitLab)
- Final step placeholder to wire exports or pipeline snippets for your spec.
Tips and troubleshooting
- If the webview UI is blank, run:
npm run build:webview (for only webview assets)
- or
npm run build
- Use the “Problems” view for YAML parse and lint findings; clicking rows jumps to lines.
- Open the Output panel from the webview buttons to see server/mocking logs when needed.
Privacy & safety
- Keys are stored using VS Code SecretStorage on your machine.
- Prefer local/private LLMs. If using hosted models, do not hard‑code keys; keep secrets on your server and call from the extension host only.
Build and package (developer)
Requirements
- Node.js (LTS)
- npm
- vsce (for packaging):
npm install -g vsce
Build steps
npm install
npm run build
# optional
vsce package
Note: .vscodeignore and files in package.json ensure sources/sourcemaps are excluded from VSIX.
License
ISC by default. Replace LICENSE with your preferred license if needed.
Contributing
Pull requests welcome. Please follow the existing code style and add tests for meaningful logic.
Update the repository field in package.json so users can file issues.