api icon indicating copy to clipboard operation
api copied to clipboard

fix issue #1502

Open stefanocudini opened this issue 3 years ago • 2 comments

this allows you to use pelias-api in a slightly different environment as a library. I also think it is a bit more elegant solution, considering that including an md file as a result of an api rest endpoint is already quite a whimsical thing :)

I wish you good work

stefanocudini avatar Oct 05 '22 13:10 stefanocudini

@missinglink @orangejulius could you please accept this small contribution? it is useful for my prod systems and I have made it a generic feature, the code is simple and clean. It would be nice to have it in the next versions

stefanocudini avatar Nov 07 '22 10:11 stefanocudini

Hi @stefanocudini, I've fixed the core issue in https://github.com/pelias/api/pull/1642, we never intended this use-case (use as a library) but it should now be possible.

I don't want to encourage users to remove the attribution route, it's a legal requirement for the use of the data, and gives credit to the maintainers of the project and contributors.

That being said, the app variable returned by addRoutes() can be modified in your application.

missinglink avatar Nov 07 '22 14:11 missinglink