yahehe / Nancy.Swagger

Nancy plugin for generated API documentation in Swagger format.
MIT License
133 stars 60 forks source link

Is self host supported? #101

Closed mmontesi closed 7 years ago

mmontesi commented 7 years ago

Hi, I'm trying to get Nancy.Swagger working in a self-hosted environment. I'm using Nancy 1.4.3 so I switched on the right branch and tried the sample. All run fine if hosted in IIS but fails if Nancy is self hosted. It seems that MetadataModules aren't loaded and I get this output:

  "paths": {
    "/users": {
      "get": {
        "summary": "Warning: no annotated method found for this route",
        "description": "[example]",
        "operationId": "GetUsers"
      },
      "parameters": []
    }

Is this a known issue? Thanks, Marco

jnallard commented 7 years ago

That looks like an error for Nancy.Swagger.Annotations.

Are you trying to use that or are you trying to use the MetadataModules? If you're using the metadata modules, you should not include Nancy.Swagger.Annotations because it replaces the default metadata provider.

mmontesi commented 7 years ago

Thanks a lot! You're right, I'm using MetadataModules and I had to remove the reference to Nancy.Swagger.Annotations Now works as expected. Thanks again, Marco

jnallard commented 7 years ago

You're welcome!