[Feature] Wildcard path variable support
Not sure if this is already supported -- if it is I suppose this is a docs improvement request. If not I suppose it's a feature request.
We have an api of the form /someRootPathSegment/{wildcardPathVar}
For example a request to:
/someRootPathSegment/foo/bar/baz
should be valid and the value of wildcardPathVar should be foo/bar/baz
To date, the openapi spec doesn't support these kinds of path variables, though some frameworks on top of openapi do support it like Connexion.
See: https://stackoverflow.com/questions/42335178/swagger-wildcard-path-parameters
Curious if Fern supports these kinds of path variables and if so an example of defining them and if not, hoping you might consider supporting it in your fern spec definition files as an improvement over openapi.
Thanks and keep up the great work.
@mmadson interesting -- it would be valuable to understand what you are planning to use Fern for and why this would be important? For example, if you are using Fern for SDK generation that would mean a user would need to pass in /a/b/c into the SDK for that path parameter
@dsinghvi thanks for the response -- we're primarily considering Fern as an api documentation generation tool for our existing APIs. We might consider sdk generation in the future though. And your example of passing in "/a/b/c" or more accurately "a/b/c" given my previous example, is correct. Our api takes in file-path like variables as wildcard path params. Thanks for your consideration.
@mmadson are you still considering an API Docs tool? We're working on improvements to our OpenAPI parsing logic and this could be in scope.
@mmadson are you still considering an API Docs tool? We're working on improvements to our OpenAPI parsing logic and this could be in scope.
Hey @dannysheridan , thanks for following up. We're using a combination of tools at the moment and don't think we've found the holy grail API doc tool, this feature would definitely be on our list and would make fern much more appealing. Looking forward to seeing what y'all cook up and hope you consider adding support for this.
Thanks
@mmadson working with users to figure out that holy grail experience is the most fun part of my job.
We can support this feature in a first-class way within the Fern Definition. The only downside on my mind is that you wouldn't be able to use our OpenAPI Exporter for routes that have a wildcard path variable (as OpenAPI doesn't support it.) Up to schedule time for us to go over requirements? https://buildwithfern.com/contact
@mmadson working with users to figure out that
holy grailexperience is the most fun part of my job.We can support this feature in a first-class way within the Fern Definition. The only downside on my mind is that you wouldn't be able to use our OpenAPI Exporter for routes that have a wildcard path variable (as OpenAPI doesn't support it.) Up to schedule time for us to go over requirements? https://buildwithfern.com/contact
Happy to jump on a call, will reach out soon. In the meantime you might consider having your openapi exporter support generating the openapi spec syntax that connexion adopted for specifying wildcard path params, as it looks pretty reasonable to me. If enough tools adopt it, perhaps the tail can wag the dog and it eventually winds up as part of the spec.
For details see this stack overflow answer describing the openapi spec example that connexion uses to represent wildcard path params.
https://stackoverflow.com/a/69200581
Closing as this hasn't come up again. Can re-engage if it is an ongoing issue!
@mmadson would this feature be valuable for you? (Dropped you a DM as well)