Skip to content

optional path parameter will always send placeholder via swagger UI #206

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

Open
whchi opened this issue Apr 17, 2025 · 0 comments
Open

optional path parameter will always send placeholder via swagger UI #206

whchi opened this issue Apr 17, 2025 · 0 comments

Comments

@whchi
Copy link

whchi commented Apr 17, 2025

When I create swagger doc with "optional path param" it will always send the placeholder {id}

.post(
    '/folders/:id?',
    async ({ params, body }) => {
      const { id } = params;
...
}, {
      params: t.Object({
        id: t.Optional(t.String()),
      }),
}

the id will always be encodeURIComponent('{id}')

Image

Image


the API works fine using curl so it should be this package's bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant