Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
35f44a8
rename
mcampa Aug 29, 2024
1ac1381
fix tests
mcampa Aug 29, 2024
b1db0b1
upgrade zod-openapi
mcampa Aug 29, 2024
5df530c
Create node.js.yml
mcampa Aug 29, 2024
ffbd403
Update node.js.yml
mcampa Aug 29, 2024
6a5f447
readme fix
mcampa Aug 29, 2024
565b63d
Update README.md
mcampa Aug 29, 2024
97dbc11
fix type issie
mcampa Aug 30, 2024
7aa0f9e
Delete .github/workflows/test.yml
mcampa Aug 31, 2024
9f675b9
tRPC 11 upgrade (#1)
mcampa Sep 2, 2024
3975034
bug fixes
mcampa Sep 2, 2024
0d7ad8b
2.0.0 release
mcampa Sep 26, 2024
060276a
upgrade to trpc ^11.0.0-rc.566
mcampa Oct 10, 2024
a074c0f
upgrade eslint and lint fixes
mcampa Oct 10, 2024
48b172b
add support for array of native-enum strings inputs
mcampa Oct 14, 2024
6fd8183
Update node.js.yml
mcampa Oct 14, 2024
d7e766b
fix github actions
mcampa Oct 14, 2024
2d8be8c
Update README.md
mcampa Nov 15, 2024
8ca3a60
Bump swagger-ui-react from 4.19.1 to 5.18.2 (#13)
dependabot[bot] Nov 23, 2024
8f34584
Bump @types/react-dom from 18.3.0 to 18.3.1 (#17)
dependabot[bot] Nov 27, 2024
887c3ae
Bump prettier from 2.8.8 to 3.4.1 (#18)
dependabot[bot] Nov 27, 2024
f6f63d5
Bump @fastify/swagger from 8.15.0 to 9.4.0 (#16)
dependabot[bot] Nov 27, 2024
cfc3ea8
Bump the npm_and_yarn group across 1 directory with 4 updates (#19)
dependabot[bot] Nov 27, 2024
cac18c8
Bump rimraf from 5.0.5 to 6.0.1 (#6)
dependabot[bot] Nov 27, 2024
063da6f
Added support for arrays in GET requests
mcampa Dec 1, 2024
88ff9a1
Upgrade trpc to ^11.0.0-rc.648
mcampa Dec 1, 2024
f60b36b
2.0.4 tRPC 11.0.0-rc.648 upgrade
mcampa Dec 1, 2024
a3a4106
v2.1.0 Upgrade zod-openapi
mcampa Dec 2, 2024
d2b6b81
Bump uuid from 9.0.1 to 11.0.3 (#25)
dependabot[bot] Dec 2, 2024
16d12f4
Bump openapi3-ts from 4.3.3 to 4.4.0 (#30)
dependabot[bot] Dec 3, 2024
2e9b526
Remove lodash.deepClone in favor of Object.assign (#36)
gm112 Dec 26, 2024
6b9168c
Bump the npm_and_yarn group with 2 updates (#35)
dependabot[bot] Dec 26, 2024
3c505be
chore: update version to 2.1.1 and add changelog
mcampa Dec 26, 2024
3eebf72
Fix build and publish 2.1.2
mcampa Jan 8, 2025
8cd9952
export all internals (#44)
bkniffler Feb 4, 2025
e2e0589
2.1.3 release
mcampa Feb 4, 2025
bd1e58f
update changelog
mcampa Feb 4, 2025
cd49d66
hotfix: requests no longer have decorators stripped (#56)
natejohnson05 Mar 30, 2025
a0bf4b4
feat: Add Koa adapter (#47)
danperkins Mar 30, 2025
af44cc5
chore: bump version to 2.1.4 and update changelog
mcampa Mar 30, 2025
5e0a7a6
fix(fastify): send raw request in http handler (#63)
meriadec Apr 4, 2025
773c426
v2.1.5
mcampa Apr 4, 2025
26cd5be
feat: add GitHub Actions workflow for NPM publishing
mcampa Apr 19, 2025
4e8f98a
Bump next from 14.2.22 to 15.2.4 (#62)
dependabot[bot] Apr 19, 2025
ec36bed
Upgrade to @trpc/server 11.1.0 (#64)
mcampa Apr 19, 2025
8ff2541
fix: NPM publish workflow
mcampa Apr 19, 2025
7b1c269
fix: remove paths filter from NPM publish workflow
mcampa Apr 19, 2025
fe02c8b
fix: remove test step (build runs the tests already)
mcampa Apr 19, 2025
0a6d62e
feat(generator): add filter option to selectively include procedures …
MendyLanda May 7, 2025
0646607
Bump @types/node from 20.17.30 to 22.15.14 (#73)
dependabot[bot] May 7, 2025
c9283fd
fix lock file version mismatch
mcampa May 7, 2025
38ea633
fix: meta can be undefined (#77)
Meierschlumpf May 24, 2025
7b15997
fix: Fastify conflict with OPTIONS method when basePath is /
mcampa Jun 28, 2025
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
14 changes: 6 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:promise/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -30,12 +25,15 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-definitions': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {},
},
],
ignorePatterns: ['rename.js'],
ignorePatterns: ['rename.js', 'dist/', 'examples/'],
};
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: lilyrose2798
github: mcampa
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ updates:
schedule:
interval: 'daily'
reviewers:
- 'lilyrose2798'
- 'mcampa'
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: ['master']
pull_request:
branches: ['master']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test
63 changes: 63 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: NPM Publish

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check if version is publishable
id: check_version
run: |
LOCAL_VERSION=$(node -p "require('./package.json').version")
PACKAGE_NAME=$(node -p "require('./package.json').name")
NPM_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "0.0.0")

echo "Local version: $LOCAL_VERSION"
echo "NPM version: $NPM_VERSION"

if [ "$LOCAL_VERSION" != "$NPM_VERSION" ] && [ "$(printf '%s\n' "$NPM_VERSION" "$LOCAL_VERSION" | sort -V | head -n 1)" = "$NPM_VERSION" ]; then
echo "Version $LOCAL_VERSION is greater than $NPM_VERSION. Preparing to publish."
echo "should_publish=true" >> "$GITHUB_OUTPUT"
else
echo "Version $LOCAL_VERSION is not greater than $NPM_VERSION. Skipping publish."
echo "should_publish=false" >> "$GITHUB_OUTPUT"
fi

- name: Build package
if: steps.check_version.outputs.should_publish == 'true'
run: npm run build

- name: Publish to NPM
if: steps.check_version.outputs.should_publish == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Final Status
if: always()
run: |
if [[ '${{ steps.check_version.outputs.should_publish }}' == 'true' ]]; then
echo "Publish process completed."
else
echo "No new version to publish."
fi
19 changes: 0 additions & 19 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sign-git-tag=false
message="@lilyrose2798/trpc-openapi v%s"
message="trpc-to-openapi v%s"
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
"[javascript]": {
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Changelog

- v2.3.1
- fix: meta can be undefined

- v2.3.0
- feat(generator): add filter option to selectively include procedures in OpenAPI output

- v2.2.0
- Upgrade to tRPC 11.1.0

- v2.1.5
- fix(fastify): send raw request in http handler https://github.com/mcampa/trpc-to-openapi/pull/63. Contribution by [@meriadec](https://github.com/meriadec)

- v2.1.4
- Koa adapter https://github.com/mcampa/trpc-to-openapi/pull/47. Contribution by [@danperkins](https://github.com/danperkins)
- Fix for Fastify adapter https://github.com/mcampa/trpc-to-openapi/pull/56. Contribution by [@natejohnson05](https://github.com/natejohnson05)

- v2.1.3

- Export all internals https://github.com/mcampa/trpc-to-openapi/pull/44. Contribution by [@bkniffler](https://github.com/bkniffler)
- CVE fixes by running npm audit fix.

- v2.1.2

- bug fix: remove lodash.cloneDeep from the build output

- v2.1.1 (bad build, do not use)

- chore: remove lodash.cloneDeep and update some dependencies

- v2.1.0

- Updated the minimum version of `zod-openapi` to 4.1.0.
- Changed `zod-openapi` to a peer dependency.
- The `protect` option now defaults to `true`.
- Improved Error schema titles

- v2.0.4

- Upgraded to tRPC 11.0.0-rc.648.

- v2.0.3

- Added support for array inputs in GET requests.
20 changes: 4 additions & 16 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
MIT License

Copyright (c) 2021 LilyRose2798 <[email protected]>
Copyright 2024 Mario Campa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading