question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to filter and customise which API endpoints are exposed

See original GitHub issue

I needed a way to customise which API endpoints are exposed, so I created a custom DocumentHelper and overrode List<MethodInfo> GetHttpTriggerMethods(Assembly assembly), providing my own custom implementation. I also needed to add a custom OpenApiHttpTriggerContext. This works great for me on v0.5.1 - here’s a gist if anyone would like to see how: https://gist.github.com/rockgecko-development/02b53d05eab230e3989fce2c2ab5ba80

I see that following the out-of-process refactoring in #142 , this method has been removed from IDocumentHelper interface and put into an extension function. How can I override this now, without also reimplementing all of Document as well?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
justinyoocommented, Jul 12, 2021

Related to #175

@rockgecko-development We got reported not all the list of the latest version of 0.8.0-preview packages have been released. We’re in the middle of investigating it and will be fixed soon. In the meantime, please stick on 0.7.2-preview.

0reactions
xsneebsxcommented, Aug 29, 2021

No worries, I didn’t mean to cover multiple issues in this one. I’ve split out my issue to #220 which is specifically around how to define parameters without needing the attributes and have updated my PR to mention the other issue as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RESTFul API endpoint design with filtering and authorization
It's conceptually easier to go to /documents and see what you can filter on, rather than look at each endpoint and see what...
Read more >
REST Web API in Practice: Naming Endpoints, Filtering ...
Our priority when naming our endpoints is to identify the resources that our API will expose to the consumers. Therefore, we have to...
Read more >
Best practices for REST API design
In this article, we'll look at how to design REST APIs to be easy to understand for anyone consuming them, future-proof, and secure...
Read more >
REST API Design: Filtering, Sorting, and Pagination
Advanced REST API design guidelines for API filtering, sorting, and pagination. ... If you have an /items endpoint which are items for sale,...
Read more >
REST API Best Practices – REST Endpoint Design Examples
Filtering, sorting, and pagination are all actions that can be performed on the collection of a REST API. This lets it only retrieve,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found