swaggest / rest

Web services with OpenAPI and JSON Schema done quick in Go
https://pkg.go.dev/github.com/swaggest/rest
MIT License
335 stars 17 forks source link

Parse regexp from path parameters #129

Open vearutop opened 1 year ago

vearutop commented 1 year ago

Describe the bug Currently, when OpenAPI schema is generated, any regular expressions are filtered out from URL pattern to make URL pattern compatible with OpenAPI.

To Reproduce

    r.Get("/{token:^\\.}", usecase.ShortURL(deps))

Expected behavior Such endpoint should produce token parameter with "pattern":"^\.".