-
Notifications
You must be signed in to change notification settings - Fork 92
Refactor Swagger to OpenAPI #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
5e58a60
c3c91bb
598fea4
d028a9d
2f1df4f
f410e31
a49b0f0
3df25f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "name": "@elysiajs/swagger", | ||
| "version": "1.3.1", | ||
| "description": "Plugin for Elysia to auto-generate Swagger page", | ||
| "name": "@elysiajs/openapi", | ||
| "version": "1.3.2", | ||
| "description": "Plugin for Elysia to auto-generate OpenAPI documentation", | ||
| "author": { | ||
| "name": "saltyAom", | ||
| "url": "https://github.com/SaltyAom", | ||
|
|
@@ -17,15 +17,10 @@ | |
| "import": "./dist/index.mjs", | ||
| "require": "./dist/cjs/index.js" | ||
| }, | ||
| "./types": { | ||
| "types": "./dist/types.d.ts", | ||
| "import": "./dist/types.mjs", | ||
| "require": "./dist/cjs/types.js" | ||
| }, | ||
| "./utils": { | ||
| "types": "./dist/utils.d.ts", | ||
| "import": "./dist/utils.mjs", | ||
| "require": "./dist/cjs/utils.js" | ||
| "./openapi": { | ||
| "types": "./dist/openapi.d.ts", | ||
| "import": "./dist/openapi.mjs", | ||
| "require": "./dist/cjs/openapi.js" | ||
| }, | ||
|
Comment on lines
+25
to
29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEnsure subpath export "./openapi" is the documented entry. Looks good; verify README and examples import from "@elysiajs/openapi/openapi". 🏁 Script executed: #!/bin/bash
rg -nP "@elysiajs/(swagger|openapi)" -g 'README.md' -g 'docs/**' -SLength of output: 194 🏁 Script executed: #!/bin/bash
# Search for openapi references in all markdown files and examples directory
rg -nP "@elysiajs/openapi" -g '*.md' -S
rg -nP "@elysiajs/openapi" -g 'examples/**' -SLength of output: 302 Update README and examples imports to use the new subpath 🤖 Prompt for AI Agents |
||
| "./scalar": { | ||
| "types": "./dist/scalar/index.d.ts", | ||
|
|
@@ -36,18 +31,35 @@ | |
| "types": "./dist/scalar/theme.d.ts", | ||
| "import": "./dist/scalar/theme.mjs", | ||
| "require": "./dist/cjs/scalar/theme.js" | ||
| }, | ||
| "./swagger": { | ||
| "types": "./dist/swagger/index.d.ts", | ||
| "import": "./dist/swagger/index.mjs", | ||
| "require": "./dist/cjs/swagger/index.js" | ||
| }, | ||
| "./swagger/types": { | ||
| "types": "./dist/swagger/types.d.ts", | ||
| "import": "./dist/swagger/types.mjs", | ||
| "require": "./dist/cjs/swagger/types.js" | ||
| }, | ||
| "./types": { | ||
| "types": "./dist/types.d.ts", | ||
| "import": "./dist/types.mjs", | ||
| "require": "./dist/cjs/types.js" | ||
| } | ||
| }, | ||
| "keywords": [ | ||
| "elysia", | ||
| "swagger" | ||
| "openapi", | ||
| "swagger", | ||
| "scalar" | ||
| ], | ||
| "homepage": "https://github.com/elysiajs/elysia-swagger", | ||
| "homepage": "https://github.com/elysiajs/elysia-openapi", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/elysiajs/elysia-swagger" | ||
| "url": "https://github.com/elysiajs/elysia-openapi" | ||
| }, | ||
| "bugs": "https://github.com/elysiajs/elysia-swagger/issues", | ||
| "bugs": "https://github.com/elysiajs/elysia-openapi/issues", | ||
| "license": "MIT", | ||
|
Comment on lines
+62
to
68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainRepository/homepage/bugs URLs changed — validate correctness before release. Avoid publishing with stale links. 🏁 Script executed: #!/bin/bash
for u in \
"https://github.com/elysiajs/elysia-openapi" \
"https://github.com/elysiajs/elysia-openapi/issues"; do
echo "Check: $u"
doneLength of output: 447 🏁 Script executed: #!/bin/bash
for u in \
"https://github.com/elysiajs/elysia-openapi" \
"https://github.com/elysiajs/elysia-openapi/issues"; do
echo "Checking: $u"
curl -o /dev/null -s -w "HTTP %{http_code} - Final URL: %{url_effective}\n" -L "$u"
doneLength of output: 851 Broken homepage/repository/bugs URLs — update before release. 🤖 Prompt for AI Agents |
||
| "scripts": { | ||
| "dev": "bun run --watch example/index.ts", | ||
|
|
@@ -60,17 +72,15 @@ | |
| "elysia": ">= 1.3.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@apidevtools/swagger-parser": "^10.1.0", | ||
| "@types/bun": "1.1.14", | ||
| "elysia": "1.3.0-exp.71", | ||
| "@apidevtools/swagger-parser": "^12.0.0", | ||
| "@types/bun": "1.2.20", | ||
| "@scalar/types": "^0.2.13", | ||
| "elysia": "1.3.21", | ||
| "eslint": "9.6.0", | ||
| "tsup": "^8.1.0", | ||
| "typescript": "^5.5.3" | ||
| "tsup": "^8.5.0", | ||
| "typescript": "^5.9.2" | ||
| }, | ||
| "dependencies": { | ||
| "@scalar/themes": "^0.9.52", | ||
| "@scalar/types": "^0.0.12", | ||
| "openapi-types": "^12.1.3", | ||
| "pathe": "^1.1.2" | ||
| "openapi-types": "^12.1.3" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the breaking changes clearly but fix formatting issues.
The changelog properly documents the major refactoring from Swagger to OpenAPI, but there are formatting issues that need to be addressed.
Apply this diff to fix the formatting issues:
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: There might be a mistake here.
Context: # 1.3.2 - 22 Aug 2025 Feature: - add
withHeaderfor adding c...(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
12-12: Hard tabs
Column: 76
(MD010, no-hard-tabs)
🤖 Prompt for AI Agents