-
Notifications
You must be signed in to change notification settings - Fork 90
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
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5e58a60
:tada: feat: refactor
SaltyAom c3c91bb
:tada: feat: refactor
SaltyAom 598fea4
:tada: feat: operationId per possible path
SaltyAom d028a9d
:tada: feat: operationId per possible path
SaltyAom 2f1df4f
:tada: feat: generator
SaltyAom f410e31
:tada: feat: export generator
SaltyAom a49b0f0
:blue_book: doc: update doc from swagger to OpenAPI
SaltyAom 3df25f4
Merge branch 'main' into hana
SaltyAom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Elysia, t } from 'elysia' | ||
| import { openapi } from '../src/index' | ||
| import { fromTypes } from '../src/gen' | ||
|
|
||
| export const app = new Elysia() | ||
| .use( | ||
| openapi({ | ||
| references: fromTypes('example/gen.ts') | ||
| }) | ||
| ) | ||
| .get('/', { test: 'hello' as const }) | ||
| .post( | ||
| '/json', | ||
| ({ body, status }) => (Math.random() > 0.5 ? status(418) : body), | ||
| { | ||
| body: t.Object({ | ||
| hello: t.String() | ||
| }) | ||
| } | ||
| ) | ||
| .get('/id/:id/name/:name', ({ params }) => params) | ||
| .listen(3000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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