Skip to content
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

Router.render() disappeared in 7, where did it go? #1684

Closed
mattbishop opened this issue Jun 26, 2018 · 28 comments · Fixed by #1752
Closed

Router.render() disappeared in 7, where did it go? #1684

mattbishop opened this issue Jun 26, 2018 · 28 comments · Fixed by #1752

Comments

@mattbishop
Copy link

In Restify 6 one could pull up a named templated URI and replace the params with values to construct a URI. This was great for hypermedia APIs that create links to other resources.

This code was deleted in 7 (see 8283277) and I've looked everywhere for it's replacement.

Hints?

@retrohacker
Copy link
Member

Hey @mattbishop,

I'm not sure what this is asking for, would you mind giving a code snippet of the original pattern?

@mattbishop
Copy link
Author

Go to your User Guide: https://restify.github.io/docs/home/

Then scroll down to the Hypermedia section. This is missing in version 7.

@NShahri
Copy link

NShahri commented Jun 30, 2018

@retrohacker
Today I tried to upgrade from Restify 6 to 7 and I realised server.router.render is undefined. As @mattbishop mentioned in user guide it is used in Hypermedia section. Also I could not find anything in API section of user guide.

@DonutEspresso
Copy link
Member

Thanks for the report, folks. FYI, in 7.x the homegrown router was replaced by find-my-way.

@hekike it looks like we kept support for named routes even in 7.x, I think it would be possible to restore this functionality. Is there any reason we couldn't do so?

@stale
Copy link

stale bot commented Aug 29, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Aug 29, 2018
@NShahri
Copy link

NShahri commented Aug 29, 2018

@DonutEspresso
Any luck about this issue.

@balexandre
Copy link

balexandre added a commit to balexandre/node-restify that referenced this issue Sep 11, 2018
Took the base code from latest version 6 and applied the version 7 routing.

fixes restify#1684
@balexandre
Copy link

@hekike @DonutEspresso brought it back on a PR... feel free to verify it :)

@tdd
Copy link

tdd commented Oct 2, 2018

@hekike @DonutEspresso this sudden disappearance of render(), which is critical to hypermedia links and remains pimped in your docs through the Getting started guide, is super-annoying.

I'm building some of the material for my Node training class on Restify and not having it is a roadblock. I'll need to monkey-patch the router, which is less than ideal. Please look at the #1702 PR from @balexandre, I can only hope this gets merged and published ASAP!

@stale
Copy link

stale bot commented Dec 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Dec 1, 2018
@balexandre
Copy link

don't let the stale-bot put this down...

@stale stale bot removed the Stale label Dec 1, 2018
@tdd
Copy link

tdd commented Dec 3, 2018

So is Restify basically dead? The fact that this issue sees zero response from the team is scary… They basically break a beloved feature, not to mention break some important plugins that relied on the legacy route object structure, and they don't merge any PR in or ack the issue 😒

@tdd
Copy link

tdd commented Dec 3, 2018

@hekike any reason this has gone completely ignored whilst two releases went out? Is there some fundamental disagreement as to this feature being brought back in? I had to do some nontrivial monkeypatching to get the current version to restore named routes and work with important community plugins again 😢

@xwlee
Copy link

xwlee commented Jan 19, 2019

I have just started to try out restify but bump to this issue. Look like the team doesn't care about this issue. Bye bye restify

@tdd
Copy link

tdd commented Jan 19, 2019

@hekike way to get people to flee to other frameworks. Breaking changes that wreck the ecosystem and complete ignorance of issues and PRs. Might as well archive the repo and Mark it as unmaintained.

I audited this landscape when rewriting my node training course and went with restify, but the behavior since this fall's upgrade means I'll have to rewrite again to use a framework that actually gives a damn.

@balexandre
Copy link

@tdd I went back to expressJs :(

@petermorlion
Copy link

petermorlion commented Feb 8, 2019

Paging @daviande who just released 7.7.0. Shouldn't the documentation be updated at least?

@tdd
Copy link

tdd commented Feb 8, 2019

@petermorlion I fail to see how this issue was addressed in the current release.

@petermorlion
Copy link

petermorlion commented Feb 8, 2019

@tdd It wasn't. But either the team should remove the part of the documentation (at a minimum) or else fix the issue. My point is, it's entirely fine for the Restify team to choose to close this issue as "wont-fix", but then the documentation should be updated.
But as they've just release 7.7.0, I guess there is still some work being done.

@tdd
Copy link

tdd commented Feb 8, 2019 via email

@hekike
Copy link
Member

hekike commented Feb 8, 2019

Sorry, recently I didn't have much time to work on Restify. I removed the stale bot, it's not very helpful. @balexandre I understand your frustration, sorry about the very long response time.
Any chance you can reopen your PR? Or should I cherry pick your commit?

rajatkumar added a commit that referenced this issue Mar 4, 2019
* feat: add router.render() to support hypermedia link generation usecase, fixes #1684
@yagomassiah
Copy link

Welp, really bad I left some hypermedia stuff left out for the end of the project and now need to rewrite to another framework. Hope you guys had different luck. Restify is great, but the feature I needed to implement was way too important to left that out.

@rajatkumar
Copy link
Member

@yagomassiah router.render() should be available in the latest version. You might want to try that out.

@yagomassiah
Copy link

@rajatkumar Using restify 7.7 and still getting router.render is not a function. you had any success using it?

@rajatkumar
Copy link
Member

I meant it is in v8.3.x. With Restify v8 we dropped support for Node6 so you shouldn't see anything else breaking if you move to the latest version.

@yagomassiah
Copy link

Any guides on how to migrate? npm install gives me restify 7.7 @rajatkumar

@rajatkumar
Copy link
Member

npm install restify@latest --save should give you restify@8.3.1.

@yagomassiah
Copy link

@rajatkumar Thanks for all the help!

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