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.

NancyModule.ModulePath support

See original GitHub issue

A NancyModule can be initialized with a modulePath like

public class V1Module : NancyModule
{
  public V1Module() : base("v1") 
  {
    // init "test/get"
    // init "test/post"
  }
}

so “test/get” and “test/post” requests are actually “v1/test/get” and “v1/test/post”.

I’ve digged into RouteDescriber and RouteBuilder but I’ve missed how to specify this. I am missing something?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
DGuidicommented, Jul 21, 2017

sorry guys, I made a mistake. all is fine, I’m simply dumb and I’ve missed a check in my code. sorry, again, for the time loss. screenshot_1

0reactions
DGuidicommented, Jul 21, 2017

If you’re talking about swagger picking up the inherited routes from parent modules

nope, I talk about what @jnallard said, he point exactly where I see the “problem”, metadata provider build routes from Nancy.RouteDescriptor, that doesn’t contain ModulePath information.

but as we said before, we’re not actively developing for the 1.4.3 stable branch

yep, maybe if you fix master branch, I can try to fix 1.4.3 one

Read more comments on GitHub >

github_iconTop Results From Across the Web

NancyModule.cs - NancyFx/Nancy
Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono - Nancy/src/Nancy/NancyModule.cs at master ...
Read more >
c# - Nancy, module not loaded
I'm fairly new to Nancy. What I'm trying to achieve, is to create a base class NancyBaseModule which inherits from the NancyModule class....
Read more >
NancyModule.cs
/// Initializes a new instance of the <see cref="NancyModule"/> class. /// </summary>. /// <param name="modulePath">A <see cref="string"/> ...
Read more >
Introducing Nancy, a lightweight web framework inspired ...
A quick look through the code (really just the NancyModule.cs) I would like to see support for a Server variable, and eventually support...
Read more >
Type-safe URL templates for Nancy
The Nancy web framework parses URLs for you, and passes requests under a given URL route and HTTP method to your program. It...
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