Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changesets/feature-task-1-2-openapi-processor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branch": "feature/task-1-2-openapi-processor",
"bump": "patch",
"environments": [
"production"
],
"packages": [
"@websublime/vite-open-api-core"
],
"changes": [
"b22c8f6c8e8de2a0c858b48ec4137da332c7a219",
"ca4e2e06471cbce0f1f882e6a76b5e6d10f54a07",
"ac1dbda3d91789e59b4e04e066365b5a98762d40"
],
"created_at": "2026-01-19T16:35:47.532886Z",
"updated_at": "2026-01-19T16:36:12.781836Z"
}
9 changes: 8 additions & 1 deletion history/TECHNICAL-SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,17 @@ function createEmptyDocument(): OpenAPIV3_1.Document {
};
}

/** Processing step identifier for error tracking */
export type ProcessorStep = 'bundle' | 'upgrade' | 'dereference' | 'validation';

export class ProcessorError extends Error {
constructor(message: string) {
/** The processing step that failed */
readonly step: ProcessorStep;

constructor(message: string, step: ProcessorStep = 'validation') {
super(message);
this.name = 'ProcessorError';
this.step = step;
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
"types": "./dist/index.d.ts"
}
}
}
}
6 changes: 6 additions & 0 deletions packages/core/src/parser/__tests__/fixtures/minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Minimal valid OpenAPI 3.0 document
openapi: '3.0.0'
info:
title: Minimal API
version: '1.0.0'
paths: {}
20 changes: 20 additions & 0 deletions packages/core/src/parser/__tests__/fixtures/swagger2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"swagger": "2.0",
"info": {
"title": "Swagger 2.0 API",
"version": "1.0.0"
},
"paths": {
"/pets": {
"get": {
"summary": "List pets",
"operationId": "listPets",
"responses": {
"200": {
"description": "Success"
}
}
}
}
}
}
64 changes: 64 additions & 0 deletions packages/core/src/parser/__tests__/fixtures/with-refs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# OpenAPI document with internal $ref references
openapi: '3.0.0'
info:
title: API with References
version: '1.0.0'
paths:
/pets:
get:
summary: List pets
operationId: listPets
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
/pets/{petId}:
get:
summary: Get pet by ID
operationId: getPetById
parameters:
- name: petId
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
components:
schemas:
Pet:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
category:
$ref: '#/components/schemas/Category'
status:
type: string
enum:
- available
- pending
- sold
Category:
type: object
properties:
id:
type: integer
name:
type: string
Loading